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

Sundance sundance at ierne.eu.org
Mon Oct 1 11:02:28 BST 2007

Detlev wrote:

> Over here it failed to start the debug client because of an
> ImportError. It cannot find the file, if the long import is given.

Hi Detlev,

I worked on it over the weekend on a different flavour of Linux, and I 
noticed the same issue you do.

Apparently different distros package Eric in different ways.

On Ubuntu (and presumably Debian) the fix works with "from 
DebugClients.Python.Config import ...", while on Gentoo it 
requires "from eric3.DebugClients.Python.Config import ...".

Since the Eric documentation DOES refer to the DebugClients package 
as 'eric3.DebugClients' (see documentation file 
index-eric3.DebugClients.html), I'll go and assert that it's probably 
Ubuntu/Debian being silly and packaging stuff their own way here.

Meaning that the fix should go:

-from Config import ConfigVarTypeStrings
+from eric3.DebugClients.Python.Config import ConfigVarTypeStrings

... And let Debian and friends fix their packaging.

Once more, however, the same treatment should probably be applied to the 
other packages that the debug client imports locally.

Or if you'd rather, I can try to look into how feasible it'd be to 
create a custom import hook that would isolate the debugger's imports 
from that of the user code.

I, uh, I hope I'm not bothering you with my repeated attention to this 
admittedly minor issue?


-- S.

More information about the PyQt mailing list