473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Standalone Python Programs...

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
6 2931
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
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
> > 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
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sandeep Gupta | last post by:
Hi, I've written a commercial application that uses Python scripts for some of the functionality. Installing the Python portion of the application requires me to first install Python, and then...
9
by: Dan Williams | last post by:
Hi people I'm getting a little annoyed with the way the print function always adds a space character between print statements unless there has been a new line. The manual mentions that "In some...
38
by: kbass | last post by:
In different articles that I have read, persons have constantly eluded to the productivity gains of Python. One person stated that Python's productivity gain was 5 to 10 times over Java in some in...
4
by: j_mckitrick | last post by:
Does it make sense to use doc strings rather than #-comments for a standalone Python app? If the classes aren't going to be re-used or imported, do they need them?
2
by: rsupansic | last post by:
Please forgive my ignorance in posting the following question. But I have been unable to find a clear answer. I have written a word processor for writing programs in two versions, one which...
2
by: James Stroud | last post by:
Hello All, I am trying to create a semi-standalone with the vendor python on OS X 10.4 (python 2.3.5). I tried to include some packages with both --packages from the command and the 'packages'...
11
by: beginner | last post by:
Hi Everyone, I am looking for a way to allow a standalone python process to easily interactive with a few web pages. It has to be able to easily receive requests from the web and post data to...
4
by: Gabriel Rossetti | last post by:
Hello everyone, I like to create a cross-platform standalone python application, like Mac OS *.app dirs. The idea is to distribute a zip file containing everything (the python interpreter and...
0
by: Philip Semanchuk | last post by:
On Oct 17, 2008, at 2:59 AM, Gabriel Rossetti wrote: Hi Gabriel, For details on how OS X .app dirs work, plug this into Google: "os x" application bundle But as Martin said, that's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.