import select
import sys
inputs=[sys.stdin]
while 1:
readable,w,e=select.select(inputs,[],inputs)
for r in readable:
print 1,
raw_input()
print 2
print 3,
when I tried this python code on Ubuntu, suppose I randomly input sth like 'asd' in the terminate. It shows:
asd
1 2
asd
3 1 2
It seems the behavior of "print blabla," will be influenced by the status of stdin's file descriptor, yet "print blabla" doesn't. Could somebody tell me what is going on there?