threaded COM server problem (does wxPython work in a thread ?)
stacom at stacom-software.de
Fri Mar 7 08:04:32 CET 2003
sunita Gupta schrieb:
>> def run (configurationFile=None, excelComClient=None):
>> gUIApp = myApp()
> Doesn't wxPython want to be the top level thread while running? I have
> tried the same approach ( I was using a debug build of wxPython which
> may have generated the particular error messages) and have gotten error
> messages to this effect.
> My solution was to spawn a new python process and have a threaded python
> com server just wait for completion. i.e. I used pipes for I/O between
> the COM server and the python process.
> I hope this helps.
AFAIK you can run wxPython in that thread, where you import the modules first,
but I'm not 100 % sure of pitfalls. But my approach works for a couple of times,
so it can't be totally wrong.
Maybe I've the time to ensure that wxPython is the problem and ask the community
with a little test script.
Thank you for your approach with the pipes, I was thinking about similar things,
maybe with pyro ...
More information about the Python-list