The documentation of raw_input() says it trys to use readline whenever available, but there seems to be a problem: file t.py: print raw_input() If I use python >>> execfile("t.py") Then I have readline functionality, but if I use python t.py I don't have any readline functionality. I would appreciate any help.