On Thu, Apr 30, 2009 at 4:34 PM, David Lyon <david.l...@preisshare.net> wrote: > Hi Tarek, > > On Thu, 30 Apr 2009 15:50:19 +0200, Tarek Ziadé <ziade.ta...@gmail.com> > wrote: >>> But during package installation, this information will be written >>> into a .PTH file somewhere along the python path... >> >> No, you just have a list of relative paths to installed package there >> that's it. > > It means the same thing. >
No, you don't have the exaustive list of the files installed. >> You don't even know what packages were installed for your project >> unless you digg into the source distribution. > > Yes I do... > > I have the following code: > > --code------- > > import pkg_resources > > ws = pkg_resources.WorkingSet() > > for i in ws: > s = str(i) > print s > > --end code--- That doesn't give you a list of installed package for your *project*. Remember that a Distutils project (one setup.py file) can install several packages in your python, and depending on the way you install(ed) it, you might not be abe to get back your packages. Try it yourself, here's such a package: create a dir with a setup.py file : """ from distutils.core import setup setup(name='ok', packages=['one', 'two']) """ now create a "one" subdirectory with a __init__ file in it, same for "two" next, run : $ python setup.py install Now tell me how you know, looking at your Python installation (site-packages), that "ok" installed "one" and "two"'... ;) Tarek -- Tarek Ziadé | http://ziade.org _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig