Ned Deily added the comment:

>If the activate code is moved to macosxSupport.activate(), does the
>following work in EditorWindow.open_turtle_demo?
>cmd = [sys.executable, '-c',
  'from idlelib.macosxSupport import activate as A; A()\n'
  'from turtledemo.__main__ import main; main()']
>Does the activate code have to be called after, say, the tkinter import in
>turtledemo, or is anytime in the process ok?

The activate code has to be called in the subprocess after Tk() has been called 
because only then is the subprocess guaranteed to have been promoted to an OS X 
GUI process.  So that suggestion will not work.  The idea of adding something 
to tkinter was discussed in msg192523 of issue11571, though not this specific 
solution.  If you want to pursue more generalized issues of GUI application 
behaviors on OS X, that should be the subject of another issue.  I suggest that 
this issue remain focused on the original topic.  I also would be concerned 
about adding the Run menu to the Shell window (or system menu bar when the 
Shell window is active) merely to accommodate this feature.  Having turtledemo 
in the Help menu seems fine to me.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17172>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to