imputil

Michael Hudson mwh21 at cam.ac.uk
Fri Nov 17 14:44:35 CET 2000


Magnus Heino <magnus.heino at rivermen.se> writes:

> Hi.
> 
> I've got foo.pyc that I want to import.
> 
> >>> import sys
> >>> import imputil
> >>> imputil.ImportManager().install()
> >>> sys.path.insert(0, imputil.BuiltinImporter())
> >>> import foo
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.0/imputil.py", line 91, in _import_hook
>     raise ImportError, 'No module named ' + fqname
> ImportError: No module named foo
> >>> 
> 
> 
> 
> Is this supposed to be working? Or is it only possible to import .py 
> modules with the current implementation of imputil?

Looks like a bug to me -- start here:

http://sourceforge.net/bugs/?group_id=5470

I'll submit it later today if you haven't, but haven't time time just
now...

Cheers,
M.

-- 
  About the use of language: it is impossible to sharpen a 
  pencil with a blunt axe. It is equally vain to try to do 
  it with ten blunt axes instead.
      -- E.W.Dijkstra, 18th June 1975. Perl did not exist at the time.



More information about the Python-list mailing list