Re: how to change sys.path?

2006-05-25 Thread John Salerno
Dennis Lee Bieber wrote: > On Wed, 24 May 2006 17:24:08 GMT, John Salerno > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> Dennis Lee Bieber wrote: >> >>> I may have gotten slightly confused >> That's my job. :) > > Okay: > > You have gotten me slig

Re: how to change sys.path?

2006-05-25 Thread Ziga Seilnacht
Michael Yanowitz wrote: > Is there something like a .pythoninitrc which can run whenever we start > Python > that can load a file with many sys.path.append(), etc? > If not is there some way to modify the Python shell constructor and > destructor? > > Thanks in advance: > Michael yanowitz Yes, t

RE: how to change sys.path?

2006-05-25 Thread Michael Yanowitz
PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of per9000 Sent: Thursday, May 25, 2006 4:07 AM To: python-list@python.org Subject: Re: how to change sys.path? also se topic named 'problem(s) with import from parent dir: "from ../brave.py import sir_robin" ' I use this every day

Re: how to change sys.path?

2006-05-25 Thread per9000
also se topic named 'problem(s) with import from parent dir: "from ../brave.py import sir_robin" ' I use this every day now: sys.path.append("../../py_scripts") best wishes, Per -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change sys.path?

2006-05-24 Thread [EMAIL PROTECTED]
sys.path.append("") eg. sys.path.append("/home/webdoc") -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change sys.path?

2006-05-24 Thread [EMAIL PROTECTED]
sys.append() Bye. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change sys.path?

2006-05-24 Thread Ju Hui
yes, we can add path to PYTHONPATH,but how to remove some items? my sys.path: >>> import sys >>> for x in sys.path: ... print x ... D:\usr\local\lib\site-packages\setuptools-0.6a11-py2.4.egg D:\usr\local\lib\site-packages\clientcookie-1.3.0-py2.4.egg c:\temp C:\WINDOWS\system32\python24.zip C:

Re: how to change sys.path?

2006-05-24 Thread John Salerno
Dennis Lee Bieber wrote: > I may have gotten slightly confused That's my job. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change sys.path?

2006-05-24 Thread Andrew Robert
Dennis Lee Bieber wrote: > On Wed, 24 May 2006 14:45:55 GMT, John Salerno > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> I just right-clicked on My Computer --> Properties --> Advanced --> >> Environment Variables, and added a new one called PYTHONPATH. I don't >> know i

Re: how to change sys.path?

2006-05-24 Thread John Salerno
Dennis Lee Bieber wrote: > On Tue, 23 May 2006 20:21:10 GMT, John Salerno > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> I meant actually adding the PYTHONPATH variable to the environment >> variables list. > > You're looking at editing the Windows registry for tha

Re: how to change sys.path?

2006-05-24 Thread Steve Holden
Ju Hui wrote: > yes, we can change PYTHONPATH to add some path to sys.path value, but > how to remove item from sys.path? > That would be del sys.path[3] for example. Of course you may need to search sys.path to determine the exact element you need to delete, but sys.path is just like any other

Re: how to change sys.path?

2006-05-23 Thread Ben Finney
[Please provide some context when you respond in an existing discussion, by quoting the original message and removing any parts irrelevant to your reply.] "Ju Hui" <[EMAIL PROTECTED]> writes: > yes, we can change PYTHONPATH to add some path to sys.path value, but > how to remove item from sys.pat

Re: how to change sys.path?

2006-05-23 Thread Ju Hui
yes, we can change PYTHONPATH to add some path to sys.path value, but how to remove item from sys.path? -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change sys.path?

2006-05-23 Thread Ben Finney
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Ju Hui a écrit : > > what the relationship between it and the sys.path? > > Don't you guess ? He's following sound Python philosophy :-) -- \Hercules Grytpype-Thynne: "Well, Neddie, I'm going to be | `\ frank." Ned Seagoon:

Re: how to change sys.path?

2006-05-23 Thread Bruno Desthuilliers
Ju Hui a écrit : > yes, I mean I want change the sys.path value and save it for next > using. > > I can change the value of sys.path, but I can't "save" it permanently. No. > There is no python_path environment on my pc, sorry, I meant PYTHONPATH (all caps, no underscore). Like all environnement

Re: how to change sys.path?

2006-05-23 Thread John Salerno
Jarek Zgoda wrote: > John Salerno napisał(a): > >>> yes, I mean I want change the sys.path value and save it for next >>> using. >>> I can change the value of sys.path, but I can't "save" it permanently. >>> There is no python_path environment on my pc, what the relationship >>> between it and the

Re: how to change sys.path?

2006-05-23 Thread Jarek Zgoda
John Salerno napisał(a): >> yes, I mean I want change the sys.path value and save it for next >> using. >> I can change the value of sys.path, but I can't "save" it permanently. >> There is no python_path environment on my pc, what the relationship >> between it and the sys.path? > > In Windows,

Re: how to change sys.path?

2006-05-23 Thread John Salerno
Ju Hui wrote: > yes, I mean I want change the sys.path value and save it for next > using. > I can change the value of sys.path, but I can't "save" it permanently. > There is no python_path environment on my pc, what the relationship > between it and the sys.path? > In Windows, at least, you can

Re: how to change sys.path?

2006-05-23 Thread Ju Hui
yes, I mean I want change the sys.path value and save it for next using. I can change the value of sys.path, but I can't "save" it permanently. There is no python_path environment on my pc, what the relationship between it and the sys.path? -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change sys.path?

2006-05-23 Thread bruno at modulix
Ju Hui wrote: > is python search module by paths in sys.path? sys.path is the list of path where the Python interpreter will search modules, yes. > how to change it manuallly? "manually" ?-) You mean "dynamically, by code" ? If yes, it's just a list. You can modify it like you'd do for any othe