"Bad file descriptor" after py2exe or Installer
Luc Saffre
luc.saffre at gmx.net
Sat Jan 24 07:33:17 EST 2004
On 30/12/2003 0:20, Thomas Heller wrote:
> Luc Saffre <luc.saffre at gmx.net> writes:
>>I would consider this as a bug (in both py2exe and Installer) since
>>they decide to pick some cygwin tcl/tk dll's who happen to hang around
>>while the Python runtime won't...
>
>
> This is part of the code (in build_exe.py).
>
> def find_dependend_dlls(self, use_runw, dlls, pypath, dll_excludes):
> import py2exe_util
> sysdir = py2exe_util.get_sysdir()
> windir = py2exe_util.get_windir()
> # This is the tail of the path windows uses when looking for dlls
> # XXX On Windows NT, the SYSTEM directory is also searched
> exedir = os.path.dirname(sys.executable)
> syspath = os.environ['PATH']
> loadpath = ';'.join([exedir, sysdir, windir, syspath])
>
> # Found by Duncan Booth:
> # It may be possible that bin_depends needs extension modules,
> # so the loadpath must be extended by our python path.
> loadpath = loadpath + ';' + ';'.join(pypath)
>
> Can you try to change the last line into
>
> loadpath = ';'.join(pypath) + ';' + loadpath
>
> and report if this helps?
Yes, this fixed the bug. Here is my test report:
1. I reproduced the bug by running a build with cygwin's tcltk package
installed: again, some part of cygwin had been grabbed. This time
however the behaviour was that the test.exe got stucked completely,
needing to be killed using TaskManager. This difference may come because
I upgraded meanwhile my copy of Cygwin.
2. I modified the line in build_exe.py as described.
3. Now the produced .exe runs well in both cases (tcltk installed during
build or not)
Sorry for the long delay before testing this.
Luc
More information about the Python-list
mailing list