[issue11075] Using Turtle with IDLE on Mac OS X

Ned Deily report at bugs.python.org
Tue Feb 1 11:46:50 CET 2011


Ned Deily <nad at acm.org> added the comment:

Now that I looked at the documentation (http://docs.python.org/library/turtle.html), I see that it is clear that Turtle is designed to work from IDLE *but*, as is noted, "when using the module from within IDLE run with the -n switch", which means run IDLE without a subprocess.  What may not be so obvious is how to do that on Mac OS X.  Double-clicking on IDLE.app launches it with default values including a subprocess and there is no straightforward to override those.  From a terminal shell, it is easy to start bin/idle:

   $ idle2.7 -n

although that has a few cosmetic disadvantages with bin/idle over IDLE.app (for example, the application name displayed is "Python" not "IDLE").  It has aways been possible to launch an OS X GUI app from a shell command line using the open(1) command; as of OS X 10.6 it is now also possible to pass regular command line arguments to the application.  So the following would work in 10.6 and probably be preferable:

   $ open -a "/Applications/Python 2.7/IDLE.app" --args -n

If you want to have a double-clickable application, a simple approach is to create a launcher application with AppleScript:

   $ osacompile -o 'IDLE-n.app' <<EOF
   > do shell script "open -a '/Applications/Python 2.7/IDLE.app' --args -n"
   > EOF

As someone not used to using Turtle and given the intended user base for Turtle, I wonder whether the current Turtle module documentation is sufficient on this point.  Two possible actions I could see are: (1) expanding the documentation to include a suggestion like the above to allow for an OS X clickable app; and/or (2) actually supplying such a simple no-subprocess app with the standard python.org installer distribution (or some other solution).  How is this issue handled on Windows?  Is there a need to expand the documentation in general?
(adding Raymond to the nosy list)

----------
nosy: +rhettinger
title: Turtle crash with IDLE on Mac OS X 10.6 -> Using Turtle with IDLE on Mac OS X
versions: +Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11075>
_______________________________________


More information about the Python-bugs-list mailing list