Re: Adding paths to sys.path permanently, and another problem...

2004-12-17 Thread Amir Dekel
Jeff Shannon wrote: Judging from this, I think that os.environ['USERPROFILE'] seems like it may do what you want, though os.environ['APPDATA'] might be useful as well. Of course, if you're trying to get something to work cross-platform, things may be more difficult -- but that's because Window

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Brian van den Broek
Jeff Shannon said unto the world upon 2004-12-16 17:54: Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system propert

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Fernando Perez
Amir Dekel wrote: > Hi everyone, > > I have two problems: > > 1. How can I keep my changes in sys.path after closing the interpreter? As others said, use $PYTHONPATH > 2. os.path.expanduser("~") always gives me "C:\\" instead of my > homepath. I have tried to change my homepath in WinXP using

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Jeff Shannon wrote: Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system properties, non helped. I really have to fi

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Jeff Shannon
Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system properties, non helped. I really have to fix this somehow. We

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Jeff Shannon wrote: Not only can one modify the environment variable PYTHONPATH, but one can also use a .pth file. Under windows, when the interpreter starts up it will search its default sys.path for any files with extension .pth; if it finds any, then it will use each line of those files as a

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Jeff Shannon
Lenard Lindstrom wrote: Amir Dekel <[EMAIL PROTECTED]> writes: Hi everyone, I have two problems: 1. How can I keep my changes in sys.path after closing the interpreter? Saving sys.path changes between interpreter runs would be more involved. On Windows Python loads the initial module search

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Jean Brouwers
Maybe, set environment variable PYTHONPATH. More details at /Jean Brouwers In article <[EMAIL PROTECTED]>, Lenard Lindstrom <[EMAIL PROTECTED]> wrote: > Amir Dekel <[EMAIL PROTECTED]> writes: > > > Hi everyone, > > > > I have two problems

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Lenard Lindstrom
Amir Dekel <[EMAIL PROTECTED]> writes: > Hi everyone, > > I have two problems: > > 1. How can I keep my changes in sys.path after closing the interpreter? > Just how flexible does this need to be? sys.path can easily be altered at startup from within a sitecustomize module (section 3.28 -- site