Add System Path?!?
"Martin v. Löwis"
martin at v.loewis.de
Tue Apr 5 16:19:25 EDT 2005
andrea_gavana at tin.it wrote:
> These exe files do not work if I don't set the PATH variable also to that
> adress. I know I can do it by hand (and also my users can), but I wonder
> if there is a way to do it in Python...
You didn't mention what operating system you are using. On Unix, PATH
is an environment variable, and environment variables can be set in
a process and all child processes, but not in a parent process. So if
you can somehow arrange that the processes that need the PATH setting
are child processes of a Python interpreter, this could be possible.
If you were hoping that you invoke a Python script, and that modifies
the environments of already-running shells - that is not possible.
Regards,
Martin
More information about the Python-list
mailing list