import problems.

Peter Otten __peter__ at web.de
Wed Jan 11 08:57:35 EST 2012


Antoon Pardon wrote:

> I have an import problem I can't figure out.
> I am using python 2.6.6 on a debian box
> 
> In one directory (pylib) I have a file misc.py and
> the file testutil.py.

>      from misc import Rec
> ImportError: cannot import name Rec
> 
> Why can I import Rec from misc in testutil when I call testutil.py
> directly but not when testutil was imported itself?

Without looking into the details, could it be that you have two misc.py 
files one with and one without Rec?





More information about the Python-list mailing list