Python live CD with Tk

Gerhard Häring gerhard.haering at opus-gmbh.net
Mon Oct 14 11:29:00 EDT 2002


Gumuz <gumuz at looze.net> [2002-10-14 15:09 GMT]:
> [Gerhard:]
>> Yep. You should be able to just copy your Python installation + python22.dll
>> + maybe your favourite editor to CD. That's also how I distribute python
>> apps myself.
> 
> ho ho, wait a minute! : D
> 
> can you explain this process for me?
 
Well, my Python installation is in c:/python22. Now for the Python app, I make
a copy of c:/python22 and manually throw out everything not needed by my app.
This is certainly more effort than using an automatic dependency tracking like
in py2exe, but for me, it's worth it, because:

- you can easily make a quick change (insert a few log statements) on the
  client's site in case something doesn't work
- you can update an app more easily (only update a few text files, instead of
  distributing a .exe)
- and most importantly for me: tracebacks work as expected

Now, copy c:/winnt/system32/python22.dll (or whereever this file is on your
computer) into the new directory, alongside python.exe. Voila a standalone
Python that you can copy about everywhere or distribute on CD.

Now just copy your app files in the same directory as python.exe and start the
app with "python.exe myscript.py", possibly from a batch file.

-- Gerhard



More information about the Python-list mailing list