473,511 Members | 15,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Minimal distro requirements for standalone python program....

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

Similar topics

2
2321
by: jeuxal_com | last post by:
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 (http://lotrtcg.decipher.com/). When you install their...
14
1700
by: Marco Aschwanden | last post by:
Hi I would like to develop an app that is (more or less) database independet. Python DB API helps when masking "parameters" of sql statements. The db driver cares for the correct conversion of a...
2
1432
by: Josh Close | last post by:
I saw a question in a PHP list about the differences between php and perl, and what the advantages between the two are, but I think I was the only person that mentioned anything about python in the...
6
2950
by: uri bushey | last post by:
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,...
0
1262
by: Thomas W | last post by:
Will there be a WSGI-server like BaseHTTPServer etc in the standard distro? I think that would increase the adoptation of the WSGI-standard. A new web-framework for python pops up every other week...
2
2304
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'...
10
2786
by: azrael | last post by:
Hy guys last night i was lying in my bed and thinking about something. is there any linux distro that is primary oriented to python. you know what i mean. no need for php, java, or something...
5
1141
by: farksimmons | last post by:
I am creating a distro of Python to be licensed as GPL.... am wondering, what would anyone suggest as to 3rd party modules being put into it (non-commercial of course!)? I know I'd put MySQLdb into...
0
1018
by: Eric_Dexter | last post by:
I have found a couple of ways to include python in my pascal program http://arctrix.com/nas/python/standalone.html and an example I compiled from the embeded examples and I was wanting to know...
0
7245
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
7144
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
7356
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,...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.