Thuban/UI/main.py : import problem
dpinte at itae.be
Wed Aug 2 10:21:32 CEST 2006
Le mardi 01 août 2006 à 19:39 +0200, Bernhard Herzog a écrit :
> > "/home/did/projets/python/thuban/trunk/thuban/Thuban/UI/application.py",
> > line 37, in ?
> > import mainwindow
> > line 18, in ?
> > from application import ThubanApplication
> > ImportError: cannot import name ThubanApplication
> > I don't understand where is the problem exactly.
> There's a recursive import. Why it fails is described in some detail here:
Thank you for the link. That was pretty obvious.
> In main.py, I guess.
> > < from application import ThubanApplication
> > > import application
> > < app = ThubanApplication(0)
> > > app = application.ThubanApplication(0)
> Looks good. Could you apply this change and check it in?
> >  What is the best way to allow the subclassing of ThubanApplication ?
> I'm not sure exactly what you are asking here. Can you elaborate a bit?
Reading the docstrings of ThubanApplication, I was thinking that
subclassing it would work directly. Then I faced the problem described
in this post and did not realize it was a problem a circular imports
(i'm a bit tired ... ;-)). So the question came and has no sense at
all. If we fix the import problem, everything works as expected.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Ceci est une partie de message
Url : http://intevation.de/pipermail/thuban-devel/attachments/20060802/5752f5f2/attachment.bin
More information about the Thuban-devel