Is there a fast, convenient way to get all the code typed into the python interpreter so far? E.g., if I type this into the interpreter:
Steven$ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print "hi"
hi
>>> a = [1,2,3]
>>> for e in a:
... print e
...
1
2
3
>>> print "bye"
bye
>>>
I would like to get these lines:
print "hi"
a = [1,2,3]
for e in a:
print e
print "bye"