Macintosh Question

Noah noah at noah.org
Wed May 1 17:42:10 EDT 2002


I don't have a Mac, but according to the mac Python docs
this is done by emulating command line arguments.
    http://www.python.org/doc/mac/argv.html
That is, whatever you drop onto the applet will show up
in your script's sys.argv list with argv[0] being the
name of your scripts and argv[1..n] being the names of
the files that you dropped.
    http://www.python.org/doc/current/lib/module-sys.html#l2h-235

Apparently, you have to make sure that you do "Save As Applet".
    http://www.python.org/doc/mac/IDEapplet.html#IDEapplet

Yours,
Noah

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Bryce C. Mason
Sent: Tuesday, April 30, 2002 3:59 PM
To: python-list at python.org
Subject: Macintosh Question


I developed a script in windows which opens a file, does "stuff" to it, and
writes a few files back to the disk.

How do I do the "drag and drop" Macintosh version?  I want the user to have
my python script on his desktop and all he has to do is drag the file over
the script, let go, and out pop the files the script generates right on his
desktop.

Any ideas?

Bryce









More information about the Python-list mailing list