[Pythonmac-SIG] How to create a desktop alias to run a python file?

Ronald Oussoren ronaldoussoren at mac.com
Sun Mar 25 11:44:25 CEST 2007


On 23 Mar, 2007, at 21:40, Christopher Barker wrote:

> Kent Quirk wrote:
>> If you're going to go through the pain, why not just use py2app,  
>> which
>> does it for you?
>
> Because Py2App doesn't support "applets". That is, something that  
> looks
> and acts like an application, but DOESN'T bundle up all the Python  
> stuff.
>
> My vision of an "applet" would be a py2app like bundle, but one that
> would not include anything installed in the Python Framework (or  
> system
> libs). i.e. all the app code, none of the Python environment.

You mean like "py2app --semi-standalone --site-packages"? This does  
require adding everything you don't want to be copied from site- 
packages to "--excludes" which is less than ideal.

I know Bob is not in favor of this, but I wouldn't mind adding a "-- 
system-dependent-applet" option to py2app that builds an "applet"  
when that would help making py2app the obvious application bundle for  
everyone. I won't be writing the required code any time soon, but if  
someone does do the legwork I can look at the patch and apply it.

>
> This has limited usefulness, as it would only work on a system with  
> all
> the right Python stuff installed, but I think it would be useful  
> non the
> less.

I thing this would be useful for inhouse applications where you have  
ful control over the system environment, although there is a risk of  
breaking application by installing a seemingly innocent python  
package that happens to conflict with something that's used by an  
application your using.

Adding full support for python eggs would go a long way of fixing  
that problem. That is, py2app could force loading of specific  
versions of python eggs to load code from site-packages instead of  
using whatever happens to be on the default search path.  That would  
significantly reduce the risk of breakage because setuptools does not  
yet have an easy to use uninstall tool (there's easy_install for  
installing but no easy_uninstall)

>
> Py2App does have an "alias" mode, but I don't think it bundles the app
> source either, it just keeps a reference of some sort to it.
>
> Is the old "build applet" working well with Python2.5, etc?

Yes, but I'd like to get rid of it in favor of py2app.

Ronald



More information about the Pythonmac-SIG mailing list