I have following script:
#!/usr/bin/python while True: x = raw_input() print x[::-1]
I am calling it from ipython:
ipython
You're probably tripping over Python's output buffering. Here's what python --help has to say about it.
python --help
-u : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x see man page for details on internal buffering relating to '-u'