Re: where the extra space comes from on the stdout

2006-12-08 Thread alf
Simon Percivall wrote: > > You already got the answer, but as for the rest: It's really easier for > you if you use raw_input() for your question/input pair instead. > thx, this is what I was looking for, alf -- http://mail.python.org/mailman/listinfo/python-list

Re: where the extra space comes from on the stdout

2006-10-02 Thread Simon Percivall
alf wrote: > Hi, > > I can not find out where the extra space comes from. Run following: > > import os,sys > while 1: > print 'Question [Y/[N]]?', > if sys.stdin.readline().strip() in ('Y','y'): > #do something > pass > > $ python q.py > Question [Y/[N]]?y > Question

Re: where the extra space comes from on the stdout

2006-10-02 Thread Gabriel G
At Saturday 30/9/2006 19:09, Steve Holden wrote: > while 1: > print 'Question [Y/[N]]?', > if sys.stdin.readline().strip() in ('Y','y'): > #do something > pass > > $ python q.py > Question [Y/[N]]?y > Question [Y/[N]]?y > Question [Y/[N]]?y > Yup. When you execute

Re: where the extra space comes from on the stdout

2006-09-30 Thread Steve Holden
alf wrote: > Hi, > > I can not find out where the extra space comes from. Run following: > > import os,sys > while 1: > print 'Question [Y/[N]]?', > if sys.stdin.readline().strip() in ('Y','y'): > #do something > pass > > $ python q.py > Question [Y/[N]]?y > Questio

where the extra space comes from on the stdout

2006-09-30 Thread alf
Hi, I can not find out where the extra space comes from. Run following: import os,sys while 1: print 'Question [Y/[N]]?', if sys.stdin.readline().strip() in ('Y','y'): #do something pass $ python q.py Question [Y/[N]]?y Question [Y/[N]]?y Question [Y/[N]]?y Ques