#13 py2exe does not maintain environment

closed-accepted
nobody
None
5
2006-11-24
2005-12-16
Thomas Heller
No

py2exe executables do not maintain the parent's
environment for childprocesses.

py2exe initialize its sys.path via a PYTHONPATH env
variable that is set before Py_Initialize() is called.
Other env vars are changed as well.

This patch uses a different approach to set the initial
sys.path before Py_Initialize() is called. Env vars
are not used at all.

Kind of a hack, we let Py_GetPath() calculate the
default path, and overwrite it then. This assumes the
Py_GetPath() returns a pointer to mutable memory.

It has to be checked in Python's source code if this
assumption is really correct in all cases.

Discussion

  • Thomas Heller
    Thomas Heller
    2005-12-16

    Patches against CVS

     
    Attachments
  • Jimmy Retzlaff
    Jimmy Retzlaff
    2006-02-13

    • status: open --> open-accepted
     
  • Thomas Heller
    Thomas Heller
    2006-11-24

    • status: open-accepted --> closed-accepted