Advertisement

Python redistributables...?

Started by July 25, 2004 02:57 PM
14 comments, last by VBBR 20 years, 1 month ago
Say I'm creating a game that uses Python as a scripting language, what files/installers should I distribute along with the game to enable the end user's computer to run the scripts inside the game? Note: I'm using Python across WSH.
So you'll create an MMORPG, uh? Well, what about reading THIS?
The python DLL, and the files for every non-builtin library module you are using (possibly none, may include some binaries (.pyd)).
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Advertisement
Thanks. What about WSH? (WSH support comes with the Win32 Python extensions)
So you'll create an MMORPG, uh? Well, what about reading THIS?
Quote: Original post by VBBR
Thanks. What about WSH? (WSH support comes with the Win32 Python extensions)


I don't know about WSH.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Hum, thanks anyway for answering. I will shoot for the two DLLs that come with the Win32 extensions.

Also, what do you mean by "non-builtin library module"? Does that include modules like sys, math, etc. or just modules that don't come with the official distribution?
So you'll create an MMORPG, uh? Well, what about reading THIS?
I don't know enough about Python to tell you what to include, but why not try what you think will work, making it public, and posting a message to the Your Announcements forum here. Maybe people will test it for you on their machines.
Advertisement
You can use py2exe to create an executable that can be run by any windows user. It should automatically pick up any dlls or modules that are required by your program. I have been very happy with this method.

I hear that Inno Setup works well with py2exe. I haven't used it myself, but it doesn't seem too hard. Check the py2exe sample directory for an example script that creates an installer.
Quote: Original post by Kapis
You can use py2exe to create an executable that can be run by any windows user. It should automatically pick up any dlls or modules that are required by your program. I have been very happy with this method.

I hear that Inno Setup works well with py2exe. I haven't used it myself, but it doesn't seem too hard. Check the py2exe sample directory for an example script that creates an installer.


Haven't used Py2Exe but Inno Setup is a great product. Can't imagine why it wouldn't work well with what you've described.
Py2exe isn't what the OP needs, as good as it is. Py2exe just seems to stub Python scripts, so it's no good for this purpose.

Were it not for WSH it would be simple to determine what's needed. Instead, it would be wise for the OP to use the Depends tool to "profile" his game and look for what libraries are dynamically linked by WSH. Chances are any of the non-system DLLs there are the Python DLLs that are required.
Py2Exe does both - it stubs the script, but also packs the dependant dlls into a subfolder, ready for distribution.
-- Single player is masturbation.

This topic is closed to new replies.

Advertisement