[PyQt] Eric3 issue: importing modules with the same name as an Eric module

Detlev Offenbach detlev at die-offenbachs.de
Tue Sep 25 18:55:55 BST 2007


On Dienstag, 25. September 2007, Sundance wrote:
> Hi peeps,
>
> I am trying to run a Python/Qt4 project in Eric3. The project has a file
> called Config.py. When I try to run the project from the Eric3
> interface, it fails, because the line 'import Config' in my code
> imports the Config module from Eric3 instead, even though my project
> directory comes first in sys.path.
>
> Is there anything I can do to keep Eric3's own modules out of the way of
> my imports?
>

That is strange. eric puts the path of the executable at sys.path[0] just 
before it's own path. Can you check sys.path in your main routine or just 
before the failing import?

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the PyQt mailing list