Getting a list of all modules

Chris Angelico rosuav at gmail.com
Wed Jul 30 10:33:07 CEST 2014


On Wed, Jul 30, 2014 at 5:43 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> Is this problem already solved? Can anyone make any suggestions?

I don't know of an actual solution, but I know where I'd look for one,
and that's importlib. If nothing else, you can use
importlib.machinery.all_suffixes() rather than hard-coding them, for
instance.

ChrisA



More information about the Python-list mailing list