forgetting state

Neil Hodgson nhodgson at bigpond.net.au
Mon Mar 25 20:35:10 EST 2002


Dale Strickland-Clark:

> There really should be a "throw it all away and let me start again"
> button.

   To do this, you need to write your shell in another language so the code
being debugged does not modify the Python shell (or debugger or IDE) code.
Another approach would be to have multiple separate Python 'worlds' one for
the shell and the other for the session. Then you have to have a way to talk
between the two.

   Some IDEs, such as HAP can run the user code in a separate process and
are able to "throw it all away and let me start again".
http://hapdebugger.sourceforge.net/
   It is a little difficult in HAP to figure out how to interact with the
Python interpreter when in the middle of debugging - the "Debug Output"
window to the right will accept commands as well as showing output. The
"Both" tab should be selected to be able to see both stderr and stdout.

   If the HAP developers are reading this, a good enhancement would be to
allow running a copy of Python without any program so that it can just be
used interactively while still having access to the locals/globals/watch
windows.

   Neil






More information about the Python-list mailing list