FAQ Index - Search - Recent Changes - Everything - Add entry

<< Previous Entry | FAQ Entry 20.9 | Next Entry >>

20.9. I don't want to use threading. What other options do I have?

Stephen Kennedy reminds us that cooperative threading using generators is an alternative. Two links describe this at a bit more length:



For capturing the output of another process, or other file-based I/O, Danny Milosavljevic proposes using non-blocking I/O. This works like so:

He has an example module available under the LGPL at [traveller.cvs.sourceforge.net] Check out about line 243. You should note he has deprecated this particular piece of code, and is using gobject.io_add_watch instead. The input_add functionality is commented still.

PyGTK FAQ Wizard | PyGTK Homepage | Feedback to faq at pygtk.org