how do i add a new path into sys.path?
John Machin
sjmachin at lexicon.net
Thu Aug 18 19:18:44 EDT 2005
wen wrote:
> on my system(win2k server, python 2.3.5),
>
>>>>import sys
>>>>print sys.path
>
> ['C:\\', 'C:\\WINNT\\system32\\python23.zip',
> 'C:\\Python23\\lib\\site-packages\\Pythonwin',
> 'C:\\Python23\\lib\\site-packages\\win32',
> 'C:\\Python23\\lib\\site-packages\\win32\\lib',
> 'C:\\Python23\\lib\\site-packages', 'C:\\Python23\\DLLs',
> 'C:\\Python23\\lib', 'C:\\Python23\\lib\\plat-win',
> 'C:\\Python23\\lib\\lib-tk', 'C:\\Python23', 'D:\\Program Files\\DeLano
> Scientific\\PyMOL\\modules']
>
> now, i wanna add "C:\Python23\Pmw\Pmw_1_2\lib" into sys.path, how?
>
> any help would be appreciated.
>
> with my kind regards,
> Wen
>
>
cat clpyaibot.log
* sys.path is instance of <list>.
* "C:\Python23\Pmw\Pmw_1_2\lib" is a [non-raw, living dangerously] string.
* does not compute, trying again under various failure modes ...
* detected Shift key failure
* interpreting "wanna" as "want to"
* parsed chunk: """I want to add <str> into <list>"""
* no such keyword: "add"
* <str>.add ... not found
* <list>.into ... not found
* <list>.addinto ... not found
* checking plausible alternatives ...
* <list>.append(<object>)
* <list>.insert(<index>, <object>)
More information about the Python-list
mailing list