Question about PythonPath
Calvelo Daniel
dcalvelo at pharion.univ-lille2.fr
Thu Sep 7 06:11:55 EDT 2000
Pieter Claerhout <Pieter_Claerhout at creoscitex.com> wrote:
:
: is it possible to change the Python path at runtime? I want to clear
: out the default directories and just use my own, without relying on
: the windows registry.
[slightly edited screenshot:]
>>> import sys
>>> sys.path
['', '/usr/lib/python1.5/', '/usr/lib/python1.5/plat-linux2',
'/usr/lib/python1.5/lib-tk', '/usr/lib/python1.5/lib-dynload',
'/usr/local/lib/python1.5/site-packages', '/usr/local/lib/site-python',
'/usr/lib/python1.5/site-packages', '/usr/lib/python1.5/site-packages/Bobo',
'/usr/lib/python1.5/site-packages/HTMLgen',
'/usr/lib/python1.5/site-packages/Numeric',
'/usr/lib/python1.5/site-packages/PIL',
'/usr/lib/python1.5/site-packages/graphics', '/usr/lib/site-python']
>>> type(sys.path)
<type 'list'>
>>> sys.path.append('/your/own/path/')
HTH, DCA
-- Daniel Calvelo Aros
calvelo at lifl.fr
More information about the Python-list
mailing list