How to obtain a 'interactive session' of a script?
bpeng at rice.edu
Sun Sep 18 18:22:19 CEST 2005
jepler at unpythonic.net wrote:
> The 'code' module contains 'Utilities needed to emulate Python's interactive
> interpreter.'. By subclassing code.InteractiveConsole and replacing the
> raw_input method with one which reads from a file, I think you can get what you
This method works fine with only one minor problem. It would stop
(waiting for user input) at help(str) command. I will have to find a way
to feed the program with'q' etc.
More information about the Python-list