I need to run a python script on a machine that doesn't have python installed. I use python as a part of a software package, and the python runs behind the curtain without the user's notice of it.
What I did was as follows.
- Copy python.exe, python26.dll, msvcr90.dll and Microsoft.VC90.CRT.manifest
- zip all the directory in LIBs directory as the python26.zip
- copy all the necessary dll/pyd file inside the DLL directory.
It seems to work, but when I change the python26.zip to the other name such as pythonlib.zip. It cannot find the python library anymore.
- Q1 : What's the magic behind the python26.zip name? The python automatically finds a library inside a python26.zip but not with different name?
- Q2 : If I have python26.zip at the same directory where python.exe/python26.dll is, I don't need to add path sys.path.append(THE PATH TO python26.zip). Is it correct?
Added
Python has built in library, and sys is one of them. I thought that I could use sys.path to point to whatever python library in zip file I needed. But, surprisingly, if I use the lib name as Python26.zip, it just worked. I wanted to ask why is this so.