There's the pkg_resources module and .eggs. That might be what you're looking for.
Try typing this in a python repl: >>> import pkg_resources >>> help(pkg_resources) On 3/23/08, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > > Hey there! > > This has really nothing to do at all with django, beside the fact that > many of it's developers should be able to answer from the top of their > head. I couldn't think right now of any nice python community, and > signing up somewhere else just to fire a single question and probably > never ever return didn't seem like something I'd do on a sunday > evening. > > For an app I'm writing, I'd love to know if it is at all possible to > do the following workflow: > > * Given a list of paths, à la PYTHONPATH, go through those paths and > it's subpaths and "discover" (aka, import) all python modules found > * Loop through all of those modules searching for classes that are > subclasses of a certain class, and add their objects to a list, or: > * make the modules "execute" (I can't recall if this really happens > upon import anyways, sorry), so that I could just use a decorator to > do the add-to-a-list thing > > I'm a tad lost on this subject, and I'd really appreciate any pointers > you could give me. > > ~ Chris > > > -- Venlig hilsen / Kind regards, Christian Vest Hansen. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---