Non-blocking raw_input
Jorge Louis de Castro
jobauk at hotmail.com
Tue Jun 28 06:29:35 EDT 2005
Thanks very much for you reply.
I have indeed tried the msvcrt module but none of the examples given works
as described on a XP+SP2 box.
I have also looked at the twisted module but some functions there do not
work on windows too, and I was told by one of the devs that it would stay
that way for some time.
Basically, I just want to wait for user input and echo it, though while the
user is not typing anything I'd like to have a background thread printing
"Come on, you're taking too long" or similar stuff.
The problem is that I can only read (and in batch) the background thread
printout messages on the console after feeding the raw_input function.
I can't find any examples or useful directions on the documentation and I've
spent a few days googling this to no avail.
Is it not possible to have the thread print its stuff and then return to
raw_input() ? Or use any function other than raw_input?
Any code examples, pseudo-code, or documentation directions will be highly
appreciated!
Thanks in advance
Cheers
jorge
>From: Peter Hansen <peter at engcorp.com>
>To: python-list at python.org
>Subject: Re: Non-blocking raw_input
>Date: Mon, 27 Jun 2005 18:43:45 -0400
>
>Jorge Louis de Castro wrote:
> > Could anyone tell me whether I can find a non blocking alternative to
> > raw_input that works on windows? Is there not a python way of achieving
> > this? Can I find it somewhere in the documentation?
> > Any help will be highly appreciated
>
>Depending on what your requirements are (since you don't really say),
>the functionality in the standard msvcrt module might help.
>--
>http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list