I\'m working on the default python interpreter on Mac OS X, and I Cmd+K (cleared) my earlier commands. I can go through them one by one using the arrow
This should give you the commands printed out in separate lines:
import readline map(lambda p:print(readline.get_history_item(p)), map(lambda p:p, range(readline.get_current_history_length())) )