Skip to main content

Allow wxPython object methods to be called from any thread.

Project description

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):

@anythread
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.

Project details


Release history Release notifications

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

This version
History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
wxAnyThread-0.1.0-py2.5.egg (4.1 kB) Copy SHA256 hash SHA256 Egg 2.5 Dec 10, 2007
wxAnyThread-0.1.0.tar.gz (2.0 kB) Copy SHA256 hash SHA256 Source None Dec 10, 2007

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page