how to clean sys.path

Laszlo Nagy gandalf at
Tue Jan 9 19:29:16 CET 2007

> 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:
sys.path is a regular list. List methods:



More information about the Python-list mailing list