[IPython-dev] problems with qt4 threading

Darren Dale dd55 at cornell.edu
Thu Sep 6 11:26:58 EDT 2007


On Friday 24 August 2007 08:22:04 am Darren Dale wrote:
> [Sorry for not replying in-thread. I'm having problems with my mail client
> losing messages from IPython and Numpy]
>
> > Am Donnerstag, 23. August 2007 18:52:20 schrieb Darren Dale:
> > > I can still make plots, interact with them,
> > > and close them. The patch can *not* be applied though, because a PyQt4
> > > import appears outside of the class definitions.
> >
> > Right, so this is the only thing that needs to be fixed.  It is not
> > trivial to do, since the current code needs to know the base class (which
> > should be different for the Qt4 IPShell) before the IPShell being used is
> > known.
> >
> > Apart from that, I wonder why you moved the two code lines that start the
> > timer?
>
> It was not important. I dont have much experience with threading, I just
> wanted to test starting the timer before starting the thread, to see what
> affect it would have.

I just got a response from Trolltech. The support engineer said that if we 
continuously receive these warning messages, it means we are calling 
qapplication.exec_ over and over again, which is we shouldnt be doing.

He also said that the warning messages can be suppressed if the global 
QT_NO_WARNING_OUTPUT is defined 
(http://doc.trolltech.com/4.3/qtglobal.html#qWarning). I tried adding 

        global QT_NO_WARNING_OUTPUT
        QT_NO_WARNING_OUTPUT = True

to IPShellQt4.__init__, but it didnt have any effect. Does anyone know if, and 
if so why, ipython is calling exec_() at each timeout?

Darren



More information about the IPython-dev mailing list