This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients amcnerney13, ned.deily, r.david.murray, rhettinger, ronaldoussoren
Date 2011-02-01.10:46:49
SpamBayes Score 1.0506575e-06
Marked as misclassified No
Message-id <1296557210.54.0.074017413354.issue11075@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2011-02-01 10:46:50ned.deilysetrecipients: + ned.deily, rhettinger, ronaldoussoren, r.david.murray, amcnerney13
2011-02-01 10:46:50ned.deilysetmessageid: <1296557210.54.0.074017413354.issue11075@psf.upfronthosting.co.za>
2011-02-01 10:46:49ned.deilylinkissue11075 messages
2011-02-01 10:46:49ned.deilycreate