Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18830

Re: import problems.

From Peter Otten <__peter__@web.de>
Subject Re: import problems.
Date 2012-01-11 14:57 +0100
Organization None
References <4F0D8CF5.1090508@rece.vub.ac.be>
Newsgroups comp.lang.python
Message-ID <mailman.4647.1326290256.27778.python-list@python.org> (permalink)

Show all headers | View raw


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?

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: import problems. Peter Otten <__peter__@web.de> - 2012-01-11 14:57 +0100

csiph-web