[Pythonmac-SIG] Fwd: py2app question

Bob Ippolito bob at redivi.com
Thu Mar 16 19:41:18 CET 2006


On Mar 16, 2006, at 8:58 AM, Dethe Elza wrote:

> Forgot to respond to list in my reply:
>
> On 3/16/06, Stewart Midwinter <stewart.midwinter at gmail.com> wrote:
>> I have an application I'd like to have located on a USB stick, and be
>> able to run in a self-contained manner on any PC it's connected to,
>> whether running OS X or Windows.   Can I use py2app to help create
>> this stand-alone distribution?
>
> There's no way to create an entirely self-contained application that
> runs on either Windows or OS X, there are just too many differences in
> how they are built and bootstrapped.  But py2app will let you build a
> self-contained application which will run off of a memory stick.  You
> might be able to use filesystem tricks to hide the OS X application on
> Windows and the Windows application on OS X, to give the illusion that
> there is only one application (some CD ROMs do this, I believe).

I don't think you can ISO format a memory stick.. at least not in a  
way that Windows would recognize...

>> Or, could I count on Python always being installed on any OS X -
>> equipped PC, and thus not need to install a separate copy on my USB
>> stick in order to be able to run my app?
>
> You cannot count on the version of Python that will be installed, or
> any external libraries you depend on.  The best thing is to bundle it
> all into your application using py2app.

py2exe does something similar to py2app, but for Windows.  Just do it  
on both systems, then drop them both on the memory stick.  They won't  
be sharing any files, but the only thing that they would be able to  
share is python bytecode, and that's insignificant compared to the  
size of Python and the compiled extensions.

-bob



More information about the Pythonmac-SIG mailing list