[Pythonmac-SIG] Shortcut for IDLE on Mac OS X (LEOPARD)
mdcrawford at gmail.com
Thu Oct 8 01:07:57 CEST 2009
On Wed, Oct 7, 2009 at 3:05 PM, Gregor Lingl <gregor.lingl at aon.at> wrote:
> Yes, I want to do interactive turtle graphics. (In fact I've written a book,
> "Python für Kids" and I was asked by a reader how to do it on a Mac.)
I'm very interested to hear more about your book. Do you also have an
For a while now I've had the idea of writing a Sugar activity for the
One Laptop Per Child project, that would teach kids how to code in
Python, without assuming that they know anything at all about
There are lots of coding tutorials, even lots of Python tutorials, but
almost all of them assume that one already knows some other language -
and that one is a grownup.
> Of course I, and especially the Kids, would prefer to click an icon on the
> desktop, or the
> dock. But as a first solution I appreciate this one very much.
I think you could write a simple AppleScript that would do the same
thing as that shell script. AppleScript have icons that are more
harmonious with the Mac experience.
Alternatively you could write a very simple C program that you build
with Xcode as a Mac application (a ".app" application bundle). It
would launch idle the way you want it and then quit. It would look
just like any regular Mac OS X application and could even have a fancy
This program would use either the execve system call or the system
library function to actually do the launch. Reaching the end of main
after doing so would cleanly quit the launcher.
See "man execve" and "man system".
The difference is that execve launches a program directly, whereas
system launches a shell that then executes the command line you feed
Michael David Crawford
mdcrawford at gmail dot com
GoingWare's Bag of Programming Tricks
More information about the Pythonmac-SIG