finding a package namespace

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

finding a package namespace

kirpit
Hi Greg and Anthony.

I've been trying to deal with very simple question within python for weeks;
http://stackoverflow.com/questions/7184375/how-to-find-import-name-of-any-package-in-python

I modified the TokenMacGuy's code snippet a bit and put it on github;
https://gist.github.com/1176645

But still could not get that simple question working in a reliable way
for all the packages on pypi. It is failing for every second package.
That's why my little gadget pydoc.net is still not working and people
can't use it. I am getting hopeless, please help.

Roy E.
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: Given a distribution, find the Python modules (Was: finding a package namespace)

Éric Araujo
Hi,

> I've been trying to deal with very simple question within python for weeks;
> http://stackoverflow.com/questions/7184375/how-to-find-import-name-of-any-package-in-python
What’s the use case?

> I modified the TokenMacGuy's code snippet a bit and put it on github;
You should be able to simplify that a bit, I’ll try to post something on
Stack Overflow later.

Here are some ideas:
- run setup.py install in a temp directory and detect modules
- run setuptools’ egg_info command and introspect one of the files it
creates

Cheers
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig