On Apr 15, 2012, at 02:12 PM, Glyph wrote: >Twisted has such a thing, mostly written by me, called >twisted.python.modules. > >Sorry if I'm repeating myself here, I know I've brought it up on this list >before, but it seems germane to this thread. I'd be interested in getting >feedback from the import-wizards participating in this thread in case it is >doing anything bad (in particular I'd like to make sure it will keep working >in future versions of Python), but I think it may provide quite a good >template for a standard API. > >The code's here: ><http://twistedmatrix.com/trac/browser/trunk/twisted/python/modules.py> > >The API is fairly simple. > >>>> from twisted.python.modules import getModule >>>> e = getModule("email") # get an abstract "module" object (un-loaded)
Got a PEP 8 friendly version? :) -Barry _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com