HELP Non-Blocking reads from sys.stdin in Windows.

barr ka202 at ic.ac.uk
Tue Dec 28 11:00:21 EST 2004


hi
Do you mean something like the following.

class inputReader(Thread):
    def __init__(self):
        Thread.__init__(self)
    def run(self):
        buffer = sys.readline()

thread = inputReader()
        thread.start()

Thanks

Kwame
"Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote in message
news:7xzmzyr2vd.fsf at ruckus.brouhaha.com...
> "barr" <ka202 at ic.ac.uk> writes:
> > I am in real need of a way to perform non blocking reads from sys.stdin
on
> > windows. I have looked every where for an answer but but with no luck. I
> > beleive there there must be a way of doing this, can some one  please
help
> > asap.
>
> Use a separate thread.





More information about the Python-list mailing list