A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-April/118749.html below:

[Python-Dev] Require loaders set __package__ and __loader__

[Python-Dev] Require loaders set __package__ and __loader__ [Python-Dev] Require loaders set __package__ and __loader__Barry Warsaw barry at python.org
Mon Apr 16 00:38:29 CEST 2012
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4