[Tutor] running & debugging in python interactive shell

Alan Gauld alan.gauld at btinternet.com
Thu Jan 15 13:14:16 CET 2009


"Artie Ziff" <artie.ziff at gmail.com> wrote

> running python scripts. Does anyone know of an article that 
> describes
> best practices for running and debugging scripts inside the python
> shell? Of course, I use import directive to run my script for first 
> run.
> I am seeking techniques for invoking parts of script after initial
> import. I hope this makes sense to those persons reading. :)

Provided you have built the module as a set of functions/classes
then after import you can just call those functions from the shell.

You cannot invoke arbitrary lines of code (as you can in the
Smalltalk workspace for example). Accessing functions etc is
normal practice in the shell so I'm not sure what you are really
asking here?


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk 




More information about the Tutor mailing list