[Python-ideas] Add a "sitedirs" list in the site module

Tarek Ziadé ziade.tarek at gmail.com
Thu May 14 12:10:41 CEST 2009


Hello

Right now there's no way to differenciate in sys.path the directories
that where added through site.addsitedirs calls,
(like when python starts up and initializes site-packages directories)

Anyone can change sys.path, and add elements in them.

So there's no way to answer to this simple question for sure : "what
are the site-packages directories ?"

What about keeping track of all directories added through
site.addsitedirs calls, with a simple list called "sitedirs"

This list would also override some container methods, so it doesn't
keep paths that are not present anymore in sys.path, somehow


Tarek

-- 
Tarek Ziadé | http://ziade.org



More information about the Python-ideas mailing list