Differences between revisions 1 and 2
Revision 1 as of 2004-01-13 13:25:02
Size: 1091
Editor: cache1-1-ffm-vpn
Comment:
Revision 2 as of 2004-01-14 12:58:28
Size: 1389
Editor: www
Comment:
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
= Another Solution =

Just another solution is to ''exclude'' the {{{os.path}}} module in the py2exe build process.
This can be done, for example, with the {{{"-e os.path"}}} command line flag.

Or use a py2exe version later than 0.5.0a5, the problem will be fixed there.

-- Thomas Heller

Problem

Using the [http://www.jorendorff.com/articles/python/path/ PathModule] from Jason Jorendorff modulfinder.py, which is called by Py2Exe, get's into an endless recursion.

It tries to resolve os.path, gets to  os.os.path , further to  os.os.path  and breaks somewhere at os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.os.path 

(Maybe it would be a test to use [http://www.stackless.com/ StackLess] Python, it would run forever or until the maximum string length of pyhton is reached. But maximum string length in Python is only limited by memory, memory is limited by address-space ... )

But apart from joking: it is IMPOSSIBLE to generate an exe with the modern 0.5 Version of Py2Exe when path.py is installed.

Solution

Just rename

site-packages/path.py

to

site-packages/jpath.py

and make sure also to toggle your imports to

   1 import jpath.py

and to delete path.pyc and path.pyo from your site-packages directory.

20041013HAM

Another Solution

Just another solution is to exclude the os.path module in the py2exe build process. This can be done, for example, with the "-e os.path" command line flag.

Or use a py2exe version later than 0.5.0a5, the problem will be fixed there.

-- Thomas Heller

PathModul (last edited 2008-07-08 11:27:43 by localhost)