Background thread or non-blocking raw_input
Jorge Louis De Castro
jorge at bcs.org.uk
Sun Jun 26 08:10:20 EDT 2005
Hi,
I've posted this before but the answer given made use of twisted functions that do not work on windows, so i'm forced to repost.
Basically, is there a way to have a thread running on the background that over rules the raw_input function?
The example I'm working on is something like having a thread that prints "You're taking too long" every 10 seconds, while waiting for input from the user.
The problem is that I can only read (and in batch) the thread printout messages on the console after giving something to the raw_input function.
Is it not possible to have the thread print its stuff and then return to raw_input() ?
Any code examples or pseudo-code or documentation directions will be highly appreciated.
Thanks in advance
jorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050626/d952fba7/attachment.html>
More information about the Python-list
mailing list