Add a "sitedirs" list in the site module

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

Le Thu, 14 May 2009 12:10:41 +0200, Tarek Ziadé <ziade.tarek@gmail.com> s'exprima ainsi:
Do you mean in fact be able to know e.g. what PYTHONPATH contained before python startup? If yes, I'm +1 for this. I would even differenciate - sys.pythondir (where the executable is, if anyone cares) - sys.defaultlibdir (where we should install a package) Denis ------ la vita e estrany

Le Thu, 14 May 2009 12:10:41 +0200, Tarek Ziadé <ziade.tarek@gmail.com> s'exprima ainsi:
Do you mean in fact be able to know e.g. what PYTHONPATH contained before python startup? If yes, I'm +1 for this. I would even differenciate - sys.pythondir (where the executable is, if anyone cares) - sys.defaultlibdir (where we should install a package) Denis ------ la vita e estrany
participants (2)
-
spir
-
Tarek Ziadé