By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,525 Members | 1,634 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,525 IT Pros & Developers. It's quick & easy.

Re: Can read() be non-blocking?

P: n/a
On Fri, Nov 7, 2008 at 8:54 AM, Thomas Christensen
<th*****@thomaschristensen.orgwrote:
Is there a way to read non-blocking? Or maybe event a better way in
generel to handle this situation?
Check out circuits [1]. It has a Component
called Stdin [2] which allows you to have
non-blocking Standard Input that I use
for getting input from the user. (works
only on Linux though). You may be able
to adapt this to suite your needs.

My telnet [3] example shows how this
Stdin component is used.

cheers
James

[1] http://trac.softcircuit.com.au/circu...uits/lib/io.py
[2] http://trac.softcircuit.com.au/circu.../lib/io.py#L55
[3] http://trac.softcircuit.com.au/circu...ples/telnet.py

--
--
-- "Problems are solved by method"
Nov 7 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.