From: Michael Foord <mike@pc...> - 2004-12-31 10:33:13
I've been building a script that runs other python scripts. When turned
into an executable it aims to present the script as 'normal' an
environment as possible. This means that the script needn't know it is
being run by a py2exe executable rather than the normal python environment.
I thought I'd summarize the result - as an interesting discussion of the
difference between the two environments.
In a py2exe environment the first entry is the path to the
executable (not unreasonably). When running an external script we
Only contains the zip file. We added the directory the script is in
(making it first place in sys.path).
Doesn't exist in a py2exe environment. Easily remedied.
isn't imported. This means that 'credits', 'exit', 'quit', and
'copyright' don't exist as builtins. (Relevant if you ever do anything
with IPython !).
sys.executable and sys.prefix are different of course.
I think the only thing here not on the wiki is the 'site.py' point.
If anyone knows anything else *missing* from a py2exe environment that
would otherwise be present - I'd like to know.
Get latest updates about Open Source Projects, Conferences and News.