[wxPython] Running wxPython in other thread than main?

Hello,

I am running wxPython 2.2.0 on winNT with Python 1.5.2.

Is there any way to setup a thread for wxPython with the threading
module other than the main thread?

I have tried to set up a thread which imports wxPython.wx and than
starts the wxApp object. This was indicated in earlier posts.

However, when I try to post events via wxPostEvent the program sometimes
works fine, sometimes it crashes. What might be the problem?

Thanks,

Joerg

···

-------------------------------------
Dipl.-Ing. Joerg Hackenberg
Lehrstuhl fuer Prozesstechnik
RWTH Aachen
Turmstrasse 46
D-52056 Aachen
Germany

Tel.: +49/241/80-4773
Fax: +49/241/8888-326
Email: hackenberg@lfpt.rwth-aachen.de
WWW: http://www.lfpt.rwth-aachen.de
-------------------------------------
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

Hello Joerg,

Tuesday, October 10, 2000, 4:59:49 PM, you wrote:

Hello,

I am running wxPython 2.2.0 on winNT with Python 1.5.2.

Is there any way to setup a thread for wxPython with the threading
module other than the main thread?

I have tried to set up a thread which imports wxPython.wx and than
starts the wxApp object. This was indicated in earlier posts.

However, when I try to post events via wxPostEvent the program sometimes
works fine, sometimes it crashes. What might be the problem?

AFAIK windows GUI is not thread safe. It must be in main thread.

···

--
Best regards,
Niki

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

I am running wxPython 2.2.0 on winNT with Python 1.5.2.

Is there any way to setup a thread for wxPython with the threading
module other than the main thread?

I have tried to set up a thread which imports wxPython.wx and than
starts the wxApp object. This was indicated in earlier posts.

However, when I try to post events via wxPostEvent the program sometimes
works fine, sometimes it crashes. What might be the problem?

Please try to make a small sample that duplicates the problem and send it to
me.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

If you happen to have more than one CPU give this a try.

import win32process
import win32api
win32process.SetProcessAffinityMask(win32api.GetCurrentProcess(), 1)

My multi threaded app on Win2k crashes when run with more than one CPU.
Unless I limit it to just one.

--Darrell

···

From: "Joerg Hackenberg" <hackenberg@lfpt.rwth-aachen.de>

I have tried to set up a thread which imports wxPython.wx and than
starts the wxApp object. This was indicated in earlier posts.

However, when I try to post events via wxPostEvent the program sometimes
works fine, sometimes it crashes. What might be the problem?

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users