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/2002-May/024196.html below:

[Python-Dev] imputil modifications

[Python-Dev] imputil modificationsGordon McMillan gmcm@hypernet.com
Mon, 20 May 2002 10:03:20 -0400
On 19 May 2002 at 17:24, Dave Hawkes wrote:

> Recently I tried to use the imputil and module and
> noticed that it had a few shortcomings, particularly
> in an environment like pythonwin. 
> 
> I implemented a few changes/additions (applicable
> to python 2.2 and up) to imputil (attached in
> newimputil.zip) to fix these problems, without
> breaking its basic structure. 

I'd suggest you check out iu.py (see
http://www.mcmillan-inc.com/iu.html).
 
> Issues addressed:
> 
> 1) Objects in sys.path can break some other modules.
 
In iu, sys.path contains strings.
 
> 2) Chaining to previous (foreign) import handlers
> supported if desired.

No chaining, but iu is a complete import replacement.
There are a couple levels at which you can override
or extend it.

> 3) reload is implemented.

iu has reload. Also has an import lock. Also puts
None is sys.modules on failure (as builtin import
does, but not imputil). Also faster.

-- Gordon
http://www.mcmillan-inc.com/





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