[Pythonmac-SIG] more on PythonLauncher

Just van Rossum just@letterror.com
Mon, 3 Feb 2003 11:17:02 +0100


Kevin Altis wrote:

> Another reason for PythonLauncher to simply default to using pythonw,
> is that PythonLauncher has no purpose except in the context of the
> Finder, right? Do tkinter scripts require pythonw? How about PyObjC?
> In other words, do we have Python scripts that it makes sense to run
> from the Finder that aren't GUI scripts that require pythonw?

I've personally hardly used PythonLauncher/pythonw yet, and for any GUI
things I prefer to build an actual .app bundle (an applet) as it allows
you to drop files on it. And for non-GUI things I use Terminal directly.

For a Python-Cocoa app (PyObjC) I don't think you can even use pythonw
as for even the simplest Cocoa app you need special entries in the
Info.plist file.

> Is PythonLauncher ever relevant to command-line scripts or CGI
> scripts?

I don't think so. 

> Would the user run scripts that use something like curses or
> readline for interactive input from the Finder; wouldn't they just
> use the Terminal? And again, if pythonw was used to run those types
> of scripts, what would the downside be?

I've been meaning to update BuildApplet so it uses my bundlebuilder.py
module on OSX and while playing with ideas I think it would suffer much
of the same problems. One idea that kindof works is: the applet process
starts a second process in terminal which will communicate i/o with the
real process over a unix domain socket. But I have my doubts about the
usability of this and it's also a rather elaborate scheme... A Finder
wrapper for a unix scripts is only useful if the script only takes a set
of files in argv: as soon is you need any other options you're simply
much better off using Terminal directly.

Just-thinking-out-loud