Py2exe Question - Deployment Advice

D

Dave Guenthner

I wrote my first Python script today and was very impressed at how
concise the code was and development time. In addition, I am using
the latest stable version of Python from ActiveState.com. Anyway,
when I compiled my file to an exectuable I was horrified to see a
"dist" folder with all kinds of co-reqs etc that had to be distributed
in order for the program to run.

For Perl, I used the Perl2exe product and I was simply given one file
..exe to distribute. Has anyone one else run into this before /
experienced that. Is there a way to have just one file?

Enterprise Environment
All Windows desktop / servers w/out Python language installed

My Goal: Evaluating Python and in addition trying to keep potential
pitfalls as simple and concise as possible concerning deployment and
support.

Thanks in advance to all you guru's.

Dave
 
R

Roger Binns

Dave said:
For Perl, I used the Perl2exe product and I was simply given one file
.exe to distribute. Has anyone one else run into this before /
experienced that. Is there a way to have just one file?

I believe the McMillan installer does that. (It actually "cheats"
and effectively unpacks itself into a temp directory every time
you run the program).

I actually just use InnoSetup to distribute my program. That also
takes care of things like putting icons in the menus and providing
an uninstall entry in the Control Panel, as well as upgrades.

The simple technical reason why there are multiple files is because
the Python implementors put the mandatory functionality into
the main dll, and have the seperate ones for optional functionality
such as regular expressions, sockets, CSV, XML etc.

Under the hood py2exe uses modulefinder. modulefinder finds every
module your program could potentially use. For example, if you
use URLs and the url library, that library references the SSL
library. modulefinder will include both, even though you may
never use an SSL based url.

If you know for certain that you don't use certain functionality,
then feel free to tell py2exe/modulefinder that you don't want
particular modules. However you need to be very certain :)

Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,667
Latest member
DaniloB294

Latest Threads

Top