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

Minimal distro requirements for standalone python program....

P: n/a
Hi,

I need to add a python program (web updater+extras) with a window
application.
The same thing as the Online Lord of the Ring game lotrtcg.decipher.com.
When you install their application, it create a subdirectory with very few
python files*.dll,*.pyd,*.pyc.:

_socket.pyd
_sre.pyd
_tkinter.pyd
(laucher.pyc)
(lotrotcglaucher.exe)
python22.dll
PyWinTypes22.dll
tcl83.dll
tk83.dll
win32api.pyd
xlib.pyd
_MEI\...

Context: I want to add some python capabilities to my application, but not
force the user to install the full python distro.
Questions:
1- Are these files sufficient? (Too simple to be true!)
2- Is their some registry/path entries do perform to setup a minimal
python runtime?

Other ideas, examples of how to do it in a simple way?

Thanks
AL
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello AL,
Context: I want to add some python capabilities to my application, but not
force the user to install the full python distro.
Questions:
1- Are these files sufficient? (Too simple to be true!) That depends on the application and which modules it uses. All of the
installers (Installer, py2exe, cx_Freeze ...) will find all the modules
a given script needs. IIRC they all use of one distutils features.
2- Is their some registry/path entries do perform to setup a minimal
python runtime?

Again, use one of the installers (py2exe seems to be popular). It will
create a small executable with all the needed modules.

HTH.
Miki

Jul 18 '05 #2

P: n/a
jeuxal_com wrote:
Context: I want to add some python capabilities to my application,
but not force the user to install the full python distro.
Questions:
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
..zip:
- 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

Hints:
- specify a nonsense directory to the -d option of compileall.py. Otherwise,
any backtraces will contain plausible filenames that do not exists on that
machine
- 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.

Daniel

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.