skip to navigation
skip to content

wxAnyThread 0.1.0

Allow wxPython object methods to be called from any thread.

Latest Version: 0.2.2

wxAnyThread: allow methods on wxPython objects to be called from any thread

In wxPython, methods that alter the state of the GUI are only safe to call from
the thread running the main event loop. Other threads must typically post
events to the GUI thread instead of invoking methods directly.

This module provides an easy way to invoke wxPython object methods safely
from any thread. Basically, the standard event-based solution is wrapped
into a decorator named "anythread", which can be applied to methods to make
them safe to call from any thread, like so:

class MyFrame(wx.Frame):

def ShowFancyStuff():
...does some GUI manipulation...

The ShowFancyStuff method can now be directly invoked from any thread.
The thread will block while the main GUI thread performs the method.  
File Type Py Version Uploaded on Size
wxAnyThread-0.1.0-py2.5.egg (md5) Python Egg 2.5 2007-12-10 4KB
wxAnyThread-0.1.0.tar.gz (md5) Source 2007-12-10 1KB