How to accelerate python application GUI speed

Brian Kelley bkelley at wi.mit.edu
Thu Sep 4 17:04:22 EDT 2003


I have put up the source code on my projects page.  You can find it at 
the bottom of the path here:

http://jura.wi.mit.edu/people/kelley/

Here is a bit of the description:

Are you annoyed that using python threads slows down your progam by 
about 30% because of the GIL (Global Interpreter Lock)?

The code described here give you another option!  You can run and 
monitor a python script running in a seperate process.  This is very 
coarse grained threading but the spawned process can run at (just about) 
full speed.  You can also kill the process as well.

The process can also send rudimentary data back to the monitoring 
application.  This includes raw python datatypes and pickled items can 
be transferred back to the monitoring application.

The usage is fairly simple:
pythonscript a python script in a text string.

dlg = ProcessDlg(parent, title, pythonscript)
dlg.Destroy()

Warning, the code hasn't been tested under linux/unix.
Enjoy.





More information about the Python-list mailing list