[Pythonmac-SIG] applescript bundle droplet

Ronald Oussoren ronaldoussoren at mac.com
Thu Aug 21 13:07:55 CEST 2008


On 21 Aug, 2008, at 3:08, beau wrote:

> I am using apple script to create a droplet that basically lets you
> pass the incoming file as an argument to a bundled python script. The
> python script then displays the output in a UI made with Tkinter.
> Questions:
>
> 1. is it possible to quit the apple script before python sends it's  
> exit code?
> 2. Is there anyway to suppress the console so only the UI shows up  
> on screen?
> 3. How can I change the name of the title on the menu bar from python
> to my app's name?

I'd drop the apple script and go for a .app bundle instead.  Py2app  
(which is included with the system install of Python on Leopard) can  
build standalone application bundles for you, as an alternative you  
could use the same trick as I use to build the IDLE.app that's  
included with the binary installers on Python.org (see http://svn.python.org/view/python/trunk/Mac/IDLE/ 
  for the code that builds the app bundle and http://svn.python.org/view/python/trunk/Lib/idlelib/macosxSupport.py?view=markup 
  for the code in IDLE that deals with "open file" events.

Either option would solve all of your questions.

Ronald



More information about the Pythonmac-SIG mailing list