using sys.stdin.raw_input and sys.stdin.readline together in a platform independent way 
Author Message
 using sys.stdin.raw_input and sys.stdin.readline together in a platform independent way

In "Programming Python" by Lutz, 2nd Ed, pp. 50-51, he indicates that if
you're
reading input from sys.stdin which has been redirected from a file, then
sys.stdin.raw_input
will be confused and will also read from that file. He then goes on to
implement a
function getreply() which will figure out how to get a character from the
console.
Is there now a platform independent way to do this in python 2.2? Pl. advise
at
your convenience. Thanks.


Sat, 24 Jul 2004 06:45:38 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problems reading fra sys.stdin and later on duing raw_input

2. Chosing between sys.argv and sys.stdin

3. sys.stdin.readlines() in 2.2a ?

4. sys.stdin.readline

5. Emacs EOF on sys.stdin.readline()

6. Error using sys.stdin.read()

7. non-blocking sys.stdin.read() on win32?

8. banging head against sys.stdin and tkinter on win32

9. sys.stdin.read() HELP!

10. reusing sys.stdin?

11. how to calculate the size of sys.stdin?

12. can i make sys.stdin.read() not wait?

 

 
Powered by phpBB® Forum Software