New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tkinter windows pop under the terminal in OSX #53630
Comments
I believe any Tkinter app will exhibit the same behavior, but I discovered this with idle and verified with wish.py: $ ./python.exe Demo/tkinter/guido/wish.py
% quit
Traceback (most recent call last):
File "Demo/tkinter/guido/wish.py", line 22, in <module>
if tk.getboolean(tk.call('info', 'complete', cmd)):
_tkinter.TclError: expected boolean value but got "" Note that the Traceback above is probably due to another bug. If you start wish.py from a terminal covering the top left corner of the screen, the wish window will appear under the terminal window. |
This is probably Tk issue, but there might me a way that tkinter can work around it. On OSX 10.6, the pre-installed /usr/bin/wish shows the same behavior, but mac ports' /opt/local/bin/wish works fine. |
I was more interested in the other problem you mentioned about "pydoc -g" crashing when you search for something. Does "pydoc -k" also crash? The -g option works for me, working or not working depends on the set of installed python packages as the search option, like "pydoc -k", searches through the docstrings of all availables modules/packages. |
On Tue, Jul 27, 2010 at 1:54 AM, Ronald Oussoren <report@bugs.python.org> wrote:
Yes, it does: $ ./python.exe -m pydoc -k xyz
lib2to3.fixes.fix_repr - Fixer that transforms `xyzzy` into repr(xyzzy).
Segmentation fault but this is not an OSX specific issue. I believe this is the same as bpo-9319. |
The placement of Tk windows is dependent on the version of Tk and platform window manager. The Aqua Tk version on Mac OS X run as a separate GUI application process and so, as is customary, the focus and window stacking does not change when it is launched. The platform-independent way to ensure the newly-created Tk window is on top is to set the "topmost" attribute on the root window: tk = _tkinter.create(os.environ['DISPLAY'], 'wish', 'Tk', 1)
tk.call('update')
tk.call('wm', 'attributes', '.', '-topmost', '1')
... http://www.tcl.tk/man/tcl8.5/TkCmd/wm.htm#M10 I suppose we could add something like that to IDLE on OS X when it creates its initial shell window. |
This is not a bug in python, but is generic platform behavior (as Ned noted). I'll therefore close this issue as won't fix. |
On Wed, Mar 16, 2011 at 10:18 AM, Ronald Oussoren
Maybe not a bug in tkinter proper, but certainly an unexpected Maybe turtle should set '-topmost' WM attribute on its main window? |
Maybe. It is definitely something that will have to be determined for every case separately and is not something that should be worked around in Tkinter itself. |
On Wed, Mar 16, 2011 at 10:42 AM, Ronald Oussoren
I agree, but I don't know how to achieve the desired behavior in the |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: