Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-05 Thread Gabriel Genellina
En Sat, 03 Feb 2007 14:25:31 -0300, Stef Mientki [EMAIL PROTECTED] escribió: Is it possible to change the searchpath for modules on the flight, under winXP ? Most preferred is some command to extend the searchpath. (the environment variable PYTHONPATH needs a reboot) PYTHONPATH is used to

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Rob Wolfe
Stef Mientki [EMAIL PROTECTED] writes: Is it possible to change the searchpath for modules on the flight, under winXP ? Most preferred is some command to extend the searchpath. (the environment variable PYTHONPATH needs a reboot) Do you mean something like that? import some_module

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
Do you mean something like that? import some_module Traceback (most recent call last): File stdin, line 1, in ? ImportError: No module named some_module import sys sys.path.append(..) import some_module Rob, thank you very much, that's exactly what I want. (Why is the obvious so often

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Jussi Salmela
Stef Mientki kirjoitti: Is it possible to change the searchpath for modules on the flight, under winXP ? What do you mean by *on the flight*: inside IDLE? using the command line? Most preferred is some command to extend the searchpath. (the environment variable PYTHONPATH needs a reboot) No,

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
Jussi Salmela wrote: Stef Mientki kirjoitti: Is it possible to change the searchpath for modules on the flight, under winXP ? What do you mean by *on the flight*: inside IDLE? using the command line? No, I run Python, embedded from within a Delphi program. Most preferred is some command to

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Inca
Through My computer | properties | advanced | Environment Variables you have to reboot. The best overall solution is the one where you modify sys.path to add your own custom paths, however Jussi is right in that you do not need to reboot. You have to restart any applications that relies on

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
Inca wrote: Through My computer | properties | advanced | Environment Variables you have to reboot. The best overall solution is the one where you modify sys.path to add your own custom paths, I agree, specially in my situation that is the best solution. however Jussi is right in that you

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Ron Adam
Stef Mientki wrote: Do you mean something like that? import some_module Traceback (most recent call last): File stdin, line 1, in ? ImportError: No module named some_module import sys sys.path.append(..) import some_module Rob, thank you very much, that's exactly what I want. (Why

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
Just a note, If you run the module from different location, it may not always work. The '..' is relative to the location you are running the module from, the current directory, and not relative to the location of the module is at. thanks for the tip Ron, I didn't realized .. was literal

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-03 Thread Sick Monkey
If you need to extend your PATH variable, I have used this in the past. This should not require a reboot. ~~ def AddSysPath(new_path): new_path = os.path.abspath(new_path) do = -1 if os.path.exists(new_path): do = 1 # check