[Pythonmac-SIG] Drag and Drop Launch of whatever.py?

Bob Ippolito bob at redivi.com
Fri Jul 21 02:38:34 CEST 2006


On Jul 20, 2006, at 5:11 PM, Christopher Barker wrote:

> Bob Ippolito wrote:
>> That's kinda strange, maybe PythonLauncher is broken. I don't think
>> anyone has paid attention to it in a few years.
>
> Last I tried, it worked. The trick was to make sure that *.py files  
> were
> associated with. I don't remember how to do that, though.
>
>> You might want to try using py2app to create actual application
>> bundles from your scripts, though.
>
> Again, I see the need for py2app to be able to create "applets" --
> Application bundles that depend on the installed Python. maybe one of
> these days I'll take the time to figure out Py2App enough to do it.

What exactly are applets supposed to be anyway? I'm not sure what  
you'd want that isn't already covered by py2app...

--alias covers the "well I already have *all* the files installed" case
--semi-standalone covers the "depend on installed Python" case
--site-packages covers the "depend on some third party stuff being  
installed" case

The only caveat I guess is the latter case, because you will have to  
explicitly set up a list of third party packages in your excludes.  
That's not really a bad thing; it documents the dependencies of your  
application, and anything you fail to list gets included so your  
application will still (likely) work as per the documented dependencies.

There is the preference of "well I'd REALLY rather list everything  
myself".. and I suppose you could get that too with somewhat awkward  
syntax. You could have a fake main script which only serves to  
confuse py2app.. something like this::

	execfile('realmain.py')

And then you'd include your source files as a resource or in  
data_files instead of as an include. It won't get you compilation  
to .pyc files, but there's little sense in doing things that way anyhow.

> By the way, Bob, thanks for the new py2App, it seems to be working  
> well.
> Is there a way to get it (and setuptools) in?:
>
> pythonmac.org/packages

No, and I already answered that (twice-ish):

http://mail.python.org/pipermail/pythonmac-sig/2006-July/017836.html
http://mail.python.org/pipermail/pythonmac-sig/2006-July/017839.html

py2app 0.2.x is effectively gone though (from the HTML on  
pythonmac.org and undefined.org). It is still distributed with  
current PyObjC installers, but that will change with the next release.

-bob



More information about the Pythonmac-SIG mailing list