Minimal distro requirements for standalone python program....

J

jeuxal_com

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
 
M

Miki Tebeka

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
 
D

Daniel Dittmar

jeuxal_com said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top