I'm currently struggling to find a satisfactory IDE for python for this exact reason. This seemingly obvious feature has to be hacked on to just about every popular coding tool. The best things I've found so far are the ipython web notebook (the only problem being that it stores my code as JSON and has poor/no keybindings) and emacs python-mode (which is buggy as all hell).
NB: The only tool I've ever found that works in the manner I want it to as far as REPL languages go is RStudio. If I had an RStudio that was language agnostic so it could work with python, ruby, lisps, or what have you, I would be a happy, happy man.
edit: if anyone has any suggestions in this regard, please, leave a comment!