post event from C-extension

Ken Seehof kseehof at neuralintegrator.com
Fri Apr 12 10:25:23 EDT 2002


I'm curious to see if you get a solution.  Try the wxPython list too.

How about if you just use PyObject_Call to call a python function that
then calls wxPostEvent on the python side.

Another approach would be to pass a wxPython window object in an entry
point in your extension.  Perhaps if you grab the right header file
from the wxPython sources, you could access the C++ pointer to the
actual C++ window.  From there you would call the wxWindows C++ version
of the wxPostEvent method.  I haven't tried this myself, but I'm
curious if it would work.

> Hi,
> 
> my program has a couple of time consuming functions. With the help
> of the wxPython Cookbook I use Threads to keep my GUI alive. When
> finished, each Thread uses wxPostEvent to notify the application.
> 
> One function is a C-extension and I have no idea how to make this
> thing sending an event. Any hint's, examples, links ?
> 
> Thanks
> Marcus
> -- 
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list