Minimal distro requirements for standalone python program....
daniel.dittmar at sap.com
Tue Mar 2 16:22:41 CET 2004
> Context: I want to add some python capabilities to my application,
> but not force the user to install the full python distro.
> 1- Are these files sufficient? (Too simple to be true!)
As python can now inport from .zip, you could add the python files as a
- run compileall.py on <pythondir>/Lib to generate .pyc
- pack all the files into python23.zip
- if you install python23.zip into the same directory as the .exe, then I
think the file will already be added to sys.path
- specify a nonsense directory to the -d option of compileall.py. Otherwise,
any backtraces will contain plausible filenames that do not exists on that
- adding the .py files is optional
- python will not import .pyd from the .zip file
> 2- Is their some registry/path entries do perform to setup a
> minimal python runtime?
No, python will search for the files relative to the executable.
More information about the Python-list