import problems.

Antoon Pardon antoon.pardon at
Wed Jan 11 09:45:36 EST 2012

On 01/11/2012 02:57 PM, Peter Otten wrote:
> 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 and
>> the file
>>       from misc import Rec
>> ImportError: cannot import name Rec
>> Why can I import Rec from misc in testutil when I call
>> directly but not when testutil was imported itself?
> Without looking into the details, could it be that you have two
> files one with and one without Rec
Well that depends on what you mean with "have".  This is what
turned up when I searched for ""

$ find /usr/local/lib /usr/lib /local/home/apardon -name -print 
2> /dev/null

That last one is my file, the rest doesn't seem to be in sys.path so 
they shouldn't interfere
as far as I understand. Changing the name of my file to 
resolves the problem though.

I'll see if I can figure out more.

More information about the Python-list mailing list