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...



On Mon, Jul 21, 2008 at 12:11 PM, arsyed <[EMAIL PROTECTED]> wrote:

> On Mon, Jul 21, 2008 at 4:46 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
>
>> Anyway. another related question. I run tests using the runner.py
>>
>> It has following syntax
>> sys.path.insert(path)
>> os.popen("python module to run")
>>
>> Will the python runned from the file see new path?
>>
>>
>>
> I'm not sure but I don't think so. Try and see what happens.
>
> I think to get that behavior, you want to set the PYTHONPATH environment
> variable instead. Then, I believe the child process will inherit the parent
> process's environment variable. If that doesn't work, look into the
> subprocess module which takes an explicit env parameter for the Popen class
> in order to accomplish this.
>
> It's probably easier just to set PYTHONPATH in your shell and then run your
> scripts so all programs will have access to it.
>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to