sys.stdin.readline()だと改行も字も入っちゃうから、これじゃダメかな?

while 1:
x = raw_input()
if x:
print x
else:
break




って>>596でいってることといっしょか…