raw_input bug only in cygwin python
David Carson
davidccarson at hotmail.com
Fri Apr 26 16:22:51 EDT 2002
Which is it? How do I carry on using raw_input()?
Richard Walkington <richard at stockcontrol.net> wrote in message news:<mailman.1019236547.15671.python-list at python.org>...
> >>I wouldn't call it a problem with cygwin, I'd call it "relying on
> >>unspecified behavior". Ctrl-D is end of file; the ability to read past EOF
> >>is not promised anywhere in the docs.
> >>
> >>
> >
> >
> >Ah, I see. However, I've seen this technique recommended in several
> >docs/tutorials. Also, the docs do promise raw_input() will raise
> >EOFError when EOF is read. So, if it is true that I'm relying on
> >unspecified behavior, my question is: How do I make this code
> >reliable? Is there a simple way to clear the EOF indication on stdin?
> > I hope there is a good way, because I like this kind of input loop
> >much better than the "type 'q' to quit" ilk.
> >
>
> I don't see anything wrong with your code. I wouldn't have throught the
> second raw_input should receive an EOF. I've also seen this technique
> used in tutorials etc.
>
>
More information about the Python-list
mailing list