py2exe DLL Search Path

Thomas Heller theller at python.net
Fri Nov 12 15:08:22 EST 2004


Manfred Knobloch <m.knobloch at iwm-kmrc.de> writes:

> Is it possible to tell py2exe to create the exe file in a way that
> the resulting exe looks  for python23.dll, _sre.pyd, library.zip, etc...
> in a subdirectory? Something like set_runtime_library_dirs?
>

You simply supply a subdirectory in the zipfile argument, like

setup(...
      zipfile="libdir\\library.zip")

This way the library.zip file as well as all the .pyd extensions will be
in the 'libdir' subdirectory relative to the exe.  python23.dll has to
be in the same directory as the exe, though - to be exact, it has to be
on the PATH that windows uses to find dlls.

Thomas



More information about the Python-list mailing list