Hoka "ME" Tichenci | 1 Sep 06:47 2005
Picon

PyQT Threading on Windows?

I've searched around a bit and nothing has really seemed to help. Right now 
i'm working on developing a GUI for a system that uses a threaded backend, 
and calls into the threads work perfectly fine. However, whenever a 
callback from the threaded application happens and a QT object gets 
touched, the whole thing freezes. I'm using QT 3.3.3 with PyQT 3.13 on 
Python 2.3, and with a little bit of research it seems like the symptoms 
all correlate to SIP3 issues. On Linux using PyQT 3.13 with SIP 4 
everything works beautifully, but on Windows it is quite ugly. Is there a 
SIP4 release of PyQT for Windows around, or am I looking in the wrong 
direction? Changing the threading code to use QThread is not an option 
(although if there is some way of easily encapsulating calls that might be 
a reasonable workaround). This problem in its entirety has given me quite a 
headache, and any ideas/solutions/leads would be fantastic.

Thanks for your time,
-Hoka

Phil Thompson | 1 Sep 09:10 2005
Picon

Re: ANN: New Releases of PyQt, PyKDE, SIP and QScintilla

> On Tue, 30 Aug 2005 20:32:50 +0100, Phil Thompson wrote:
>
>> The following have been released and are available at the usual place...
>>
>> PyQt v3.15
>> PyKDE-snapshot20050829
>> SIP v4.3
>> QScintilla v1.6
>>
>> Most of the work has been under the covers - supporting Python's cyclic
>> garbage collector in particular.
>>
>> The PyKDE snapshot is a hacked version done by me to fix
>> incompatibilities
>> with the latest SIP. Any breakage is my fault, not Jim's.
>
> I'm not sure where the changes have occurred but, without applying any
> patches of my own, I now find that:
>
>  * None of my KPart plugins work any more - the receivers for the KActions
>    I set up are never called. I'm still chasing this bug but it seems
> that,
>    unlike C++ slots, Python functions/methods are never called. It seems
>    that the Python slot is somehow transferred out of existance by the
>    KAction because, if I assign the method to an instance variable
> (keeping
>    a copy around), the slot is called when the action is activated.

Got a test script? When a connection is made to a Python slot the
reference count of the slot is not increased (never has been). The current
(Continue reading)

Phil Thompson | 1 Sep 09:20 2005
Picon

Re: Importing sip-generated module into multiple interpreters

> Hi,
>
> I'm trying to encapsulate a script into
> a seperate Python interpreter.  The idea
> is that these scripts are safely
> isolated from the rest of the system,
> except for our sip-generated "module" API.
>
> 1    Py_BEGIN_ALLOW_THREADS
>
> 2    PyThreadState *pi =  Py_NewInterpreter();
> 3    initsip();
> 4    initmodule();
> 5    PyRun_SimpleString("...");
> 6    Py_EndInterpreter(pi);
>
> 7    Py_END_ALLOW_THREADS
>
> I get the following error in response to line 4,
> perhaps sip isn't designed to deal with multiple
> interpreters?
>
> RuntimeError: the sip module has already registered a module called
> icecore
>
> Any info would be appreciated, especially if
> there is another way to achieve a sandbox sharing
> the same interpreter.

SIP modules should work with multiple interpreters (though it's not
(Continue reading)

Phil Thompson | 1 Sep 09:26 2005
Picon

Re: PyQT Threading on Windows?

> I've searched around a bit and nothing has really seemed to help. Right
> now
> i'm working on developing a GUI for a system that uses a threaded backend,
> and calls into the threads work perfectly fine. However, whenever a
> callback from the threaded application happens and a QT object gets
> touched, the whole thing freezes. I'm using QT 3.3.3 with PyQT 3.13 on
> Python 2.3, and with a little bit of research it seems like the symptoms
> all correlate to SIP3 issues. On Linux using PyQT 3.13 with SIP 4
> everything works beautifully, but on Windows it is quite ugly. Is there a
> SIP4 release of PyQT for Windows around, or am I looking in the wrong
> direction? Changing the threading code to use QThread is not an option
> (although if there is some way of easily encapsulating calls that might be
> a reasonable workaround). This problem in its entirety has given me quite
> a
> headache, and any ideas/solutions/leads would be fantastic.

I assume from what you say that you are using the non-commercial version
of Qt/PyQt on Windows. This is SIP v3 based because the version of Qt is
v2.x. If you want a version built with SIP v4 you will need the commercial
versions of Qt and PyQt.

Phil

Diez B. Roggisch | 1 Sep 11:05 2005
Picon

Re: PyQT Threading on Windows?

> I assume from what you say that you are using the non-commercial version
> of Qt/PyQt on Windows. This is SIP v3 based because the version of Qt is
> v2.x. If you want a version built with SIP v4 you will need the commercial
> versions of Qt and PyQt.

He says Qt 3.x - so I guess he might be using Qt-free-win edition? I had 
similar problems there - QCustomEvent for inserting concurrent events 
into the event-loop of qt didn't work. Never tried to tackle that, 
though - with qt4 on the horizon.

Regards,

Diez

Detlev Offenbach | 1 Sep 19:49 2005
Picon

Re: ANN: New Releases of PyQt, PyKDE, SIP and QScintilla

Am Dienstag, 30. August 2005 21:32 schrieb Phil Thompson:
> The following have been released and are available at the usual place...
>
> PyQt v3.15
> PyKDE-snapshot20050829
> SIP v4.3
> QScintilla v1.6
>
> Most of the work has been under the covers - supporting Python's cyclic
> garbage collector in particular.
>
> The PyKDE snapshot is a hacked version done by me to fix incompatibilities
> with the latest SIP. Any breakage is my fault, not Jim's.
>
> Phil
>
> _______________________________________________
> PyKDE mailing list    PyKDE <at> mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

I have uploaded a compatibility update of eric3 3.7.x. It is version 3.7.2-rc1 
and may be found in the eric3 snapshots areas. Once it has been more widely 
tested, it will be released as 3.7.2 via sourceforge. Please note, that 3.7.1 
and earlier versions will not work with PyQt 3.15.

Regards,
Detlev
--

-- 
Detlev Offenbach
detlev <at> die-offenbachs.de
(Continue reading)

Torsten Marek | 1 Sep 22:56 2005
Picon
Picon

Re: ANN: New Releases of PyQt, PyKDE, SIP and QScintilla


Detlev Offenbach schrieb:
> Am Dienstag, 30. August 2005 21:32 schrieb Phil Thompson:
> 
>>The following have been released and are available at the usual place...
>>
>>PyQt v3.15
>>PyKDE-snapshot20050829
>>SIP v4.3
>>QScintilla v1.6
>>
>>Most of the work has been under the covers - supporting Python's cyclic
>>garbage collector in particular.
>>
>>The PyKDE snapshot is a hacked version done by me to fix incompatibilities
>>with the latest SIP. Any breakage is my fault, not Jim's.
>>
>>Phil
>>
>>_______________________________________________
>>PyKDE mailing list    PyKDE <at> mats.imk.fraunhofer.de
>>http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
> 
> 
> I have uploaded a compatibility update of eric3 3.7.x. It is version 3.7.2-rc1 
> and may be found in the eric3 snapshots areas. Once it has been more widely 
> tested, it will be released as 3.7.2 via sourceforge. Please note, that 3.7.1 
> and earlier versions will not work with PyQt 3.15.
> 

(Continue reading)

Michael Andrews | 2 Sep 01:59 2005

Re: PyQT Threading on Windows?

On Wed, 2005-08-31 at 21:47 -0700, Hoka "ME" Tichenci wrote:
> I've searched around a bit and nothing has really seemed to help. Right now 
> i'm working on developing a GUI for a system that uses a threaded backend, 
> and calls into the threads work perfectly fine. However, whenever a 
> callback from the threaded application happens and a QT object gets 
> touched, the whole thing freezes. I'm using QT 3.3.3 with PyQT 3.13 on 
> Python 2.3, and with a little bit of research it seems like the symptoms 
> all correlate to SIP3 issues. On Linux using PyQT 3.13 with SIP 4 
> everything works beautifully, but on Windows it is quite ugly. Is there a 
> SIP4 release of PyQT for Windows around, or am I looking in the wrong 
> direction? Changing the threading code to use QThread is not an option 
> (although if there is some way of easily encapsulating calls that might be 
> a reasonable workaround). This problem in its entirety has given me quite a 
> headache, and any ideas/solutions/leads would be fantastic.

I don't remember the symptoms, but we had problems with threading when
our Python class was deriving from the QThread class.  We were
forgetting to call the QThread.__init__() in our __init__().

--

-- 
Michael Andrews <mandrews <at> mandrews.org>

Jean-Yves Avenard | 2 Sep 11:50 2005

Error running Eric3

Dear all.

I have to admit I'm very new to PyQt and Eric3.

I am running Linux RedHat 9.
I installed python2.4, qt-mt, PyQt, QScintilla, sip-4.3 as described in
the README file in Eric3.
Then installed eric3.

When I just run eric3 it gets to display the logo, then dies with the
following errors (attached at the bottom of the email).

Google and other search engines haven't returned any useful help.

Any suggestions, help?
Thank you in advance
Kind Regards
Jean-Yves

[avenardj <at> pctest avenardj]$ eric3
Warning: translation file 'qt_en_AU.UTF-8'could not be loaded.
Using default.
Warning: translation file 'eric3_en_AU.UTF-8'could not be loaded.
Using default.
Warning: translation file 'qscintilla_en_AU.UTF-8'could not be loaded.
Using default.
QObject::connect: No such signal
QListView::doubleClicked(QListViewItem*,const QPoint&,int)
QObject::connect:  (sender name:   'unnamed')
QObject::connect:  (receiver name: 'unnamed')
(Continue reading)

Nigel Stewart | 2 Sep 16:41 2005

Re: Importing sip-generated module into multiple interpreters

> SIP modules should work with multiple interpreters (though it's not
> something I test), but (any) module initialisation can only be done once
> per process - not once per interpreter.

Phil,

Is there a sip or Python C API way to import
the module into the second interpreter, without
calling initmodule()?

Nigel


Gmane