script readline ipython all nice solutions... There's one more (old) one: emacs ie you can run python inside (under) emacs That way you can pun thus: your interactions with python are a session when you choose and a file when you choose (buffer in emacs-speak). [Frank admission: The emacs python modes are multiple and in a (bit of a) mess]