Possible Duplicate:
How to save a Python interactive session?
Is it possible, and if so, how do I save the code that I have written in an IPython session?
Optimally I would only output the code that runs without errors, but exporting all the code would go a long way as well, I suppose.