how to clean sys.path

siggi smusnmrNOSPAM at yahoo.com
Wed Jan 10 02:25:16 EST 2007


Thank you Laszlo!

Take care,

siggi

"Laszlo Nagy" <gandalf at designaproduct.biz> schrieb im Newsbeitrag 
news:mailman.2489.1168367359.32031.python-list at python.org...
>
>>
>> So far, I know only the command >>>sys.path.append(r'c:....etc...'), but 
>> how to delete or insert at the beginning of the list, I know not.
>>
> You can delete a slice. For example,
>
> del sys.path[2:5]
>
> More about slicing: http://docs.python.org/ref/slicings.html
> sys.path is a regular list. List methods: 
> http://docs.python.org/tut/node7.html
>
> Best,
>
>   Laszlo
> 





More information about the Python-list mailing list