I have following script:
#!/usr/bin/python while True: x = raw_input() print x[::-1]
I am calling it from ipython:
ipython
When you are through writing to p.stdin, close it: p.stdin.close()
p.stdin.close()