On Mon, Jul 21, 2008 at 5:15 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:

> They want me to do one test runner which runs any test... And ideally it
> should work on any platform....
>
> When I added something to $PYTHONPATH, they told me to remove it...
>
>
You can set environment variables within python, e.g.:

os.environ['PYTHONPATH'] = '/some/path:' + old_path

What I don't know is if child processes invoked through os.popen inherit
that variable on all platforms. However, the subprocess.Popen object takes
an explicit "env" variable for that purpose:

http://docs.python.org/lib/node528.html
http://docs.python.org/lib/module-subprocess.html

So you should be able to use that for the same effect.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to