change a file with a context manager

Terry Reedy tjreedy at udel.edu
Tue Dec 13 16:57:31 EST 2011


On 12/13/2011 9:21 AM, Andrea Crotti wrote:

> Another possible option is to just add to the path everything contained
> in that
> correct easy_install.pth file.
> Or is there a way to reload the path settings?

If you are talking about sys.path, you can certainly copy, mutate or 
replace, and restore sys.path. The details depend on whether you mutate 
or replace the original.

-- 
Terry Jan Reedy




More information about the Python-list mailing list