By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,022 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,022 IT Pros & Developers. It's quick & easy.

Standalone Python Programs...

P: n/a
I have a Python program that is built on an infrastructure of quite a
few other programs, but I would like to create a standalone nonetheless.

It doesn't necesarily have to be its own executable, although this is
the most attractive option - it could just mean distributing the entire
python distribution with it in an installer or something.

However, here is what I have called in my python file:
Tkinter, and multiple Pmw widgets
WaveSurfer, called as a "Wsurf" widget, which is a great little program
used for Spectrograms of wave files etc. It relies on Tcl/Tk and the
SNACK library, which also have to be installed for my script to work.

Can anyone help? I'm open to any option, py2xe, mcmillan's, or cx_freeze
or whatever that program is, or even an installer that installs all of
those programs.

I'm vying for the most elegant solution.

Thanks!

--uri
Jul 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
I've found that py2exe and Inno Setup Installeer to be a good
combination (for Windows). It isn't a single executable, but
then what modern program is any more. It doesn't require
distribution/installation of Python. I've used it to install
some pretty complex combinations (wxWindows, PIL, ReportLab,
etc.) with no problems. Inno Setup has proven to be flexible
enough to install everything that I've done so far.

I can't speak to Linux installations because I have always
just used the Python installation already there.

HTH,
Larry Bates
Syscon, Inc.

"uri bushey" <ur******@sas.upenn.edu> wrote in message
news:ce***********@netnews.upenn.edu...
I have a Python program that is built on an infrastructure of quite a
few other programs, but I would like to create a standalone nonetheless.

It doesn't necesarily have to be its own executable, although this is
the most attractive option - it could just mean distributing the entire
python distribution with it in an installer or something.

However, here is what I have called in my python file:
Tkinter, and multiple Pmw widgets
WaveSurfer, called as a "Wsurf" widget, which is a great little program
used for Spectrograms of wave files etc. It relies on Tcl/Tk and the
SNACK library, which also have to be installed for my script to work.

Can anyone help? I'm open to any option, py2xe, mcmillan's, or cx_freeze
or whatever that program is, or even an installer that installs all of
those programs.

I'm vying for the most elegant solution.

Thanks!

--uri

Jul 18 '05 #2

P: n/a
On 2004-08-06, Larry Bates <lb****@swamisoft.com> wrote:
I have a Python program that is built on an infrastructure of
quite a few other programs, but I would like to create a
standalone nonetheless.

It doesn't necesarily have to be its own executable, although
this is the most attractive option - it could just mean
distributing the entire python distribution with it in an
installer or something.

That's a false dichotomy. There is a choice in-between a
"stand-alone program" and "an entire Python distribution":
Something like py2exe which creates a "distribution" containing
only the things (dll's and compiled+compressed Python modules)
needed by your application.

Besides, expecting to create a stand-alone executable is pretty
unrealistic these days. There are very, very few stand-alone
Win32 programs any more (putty.exe is the only one I've seen in
the past 5 years). Everything else in the Win32 world seems to
need to have a set of files "installed" using an installer.
I've found that py2exe and Inno Setup Installeer to be a good
combination (for Windows). It isn't a single executable, but
then what modern program is any more. It doesn't require
distribution/installation of Python. I've used it to install
some pretty complex combinations (wxWindows, PIL, ReportLab,
etc.) with no problems. Inno Setup has proven to be flexible
enough to install everything that I've done so far.
Same here. I've used py2exe + Inno Setup for a handfull of
small wxPython applications and it's all worked quite nicely.
I can't speak to Linux installations because I have always
just used the Python installation already there.


Yup.

--
Grant Edwards grante Yow! I invented skydiving
at in 1989!
visi.com
Jul 18 '05 #3

P: n/a
> > I can't speak to Linux installations because I have always
just used the Python installation already there.


Yup.


Instalation is there, but not the third party packages.
Jul 18 '05 #4

P: n/a
Grant Edwards <gr****@visi.com> wrote:
Same here. I've used py2exe + Inno Setup for a handfull of
small wxPython applications and it's all worked quite nicely.
Same here too, InnoSetup is especially useful if you need to bundle
auxilliary files like icons, images, ChangeLogs etc. or make
desktop/startbar shortcuts.

I think py2exe is perfect, cx_Freeze is still not 100%
I can't speak to Linux installations because I have always
just used the Python installation already there.

Yup.


I tried McMillan Installer on Linux, and had little success - because
even if you get the binary to build, it usually has .so dependency
issues - basically you need wxWidgets or GTK+ or whatever installed on
top of any Python you've coded.

I've falling back to providing the source and leaving it as an
exercise to the user to install all the Python modules they may not
have in their base install.

One of the attractions of IronPython is that you can build a single
..exe (or .bin on Linux I guess?) although the user still needs the CLR
runtime installed.
Jul 18 '05 #5

P: n/a

So per everyone's advice, I decided to make a go of it with py2exe.
Unfortunately I'm getting a traceback instead of an executable.
It states: "WindowsError: [Errno 3] The system cannot find the path
specified:
'C:\\PythonProgram\\dist\\library.zip\\Pmw/*.*'
I did some searching and discovered that I have to use 'bundlepmw.' So I
did this, and then I get an error about one of my libraries instead:

_tkinter.TclError: Can't find package wsurf 1.7

So I added this to dist\tcl, and then I get an error about my next
library, snack. Well, adding all of these libraries is eventually going
to defeat the purpose of freezing the program, isn't it? Wsurf itself is
4 MB!

Is there something else i should be doing?
Jul 18 '05 #6

P: n/a
simo wrote:
One of the attractions of IronPython is that you can build a single
.exe (or .bin on Linux I guess?) although the user still needs the CLR
runtime installed.

One of the attractions of Python is that you can build a single frozen
file although the user still needs the Python interpreter installed ...

David
Jul 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.