newbie trying understand sys.path
MARK LEEDS
markleeds at verizon.net
Sun Feb 26 21:23:34 EST 2006
I was trying to understand the concept of python looking for modules in sys.path.
So, as it said in "Beginning Python", I went into my .bashrc file and did
export PYTHONPATH=$PYTHONPATH:~/mytemp
then, i typed pprint.pprint(sys.path) and it worked.
it was in there !!!!!!!!!!!!!!!!!!!!!!!!
but, now I want to take it out.
i deleted the command from the .bashrc file and resourced it but it was still in there.
So, then I tried ( inside a python program )
sys.path = sys.path[1:]
and it works inside the program so that sys.path changed while the program was running.
but, then i checked it again, by taking out the above command
and typing pprint.pprint(sys.path) and it was still there ?
Basically, my question is : Is there a permanent way of taking things out of sys.path that
you put in sort of by accident or for experimentation ?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060226/870ead5a/attachment.html>
More information about the Python-list
mailing list