[Tutor] How to inspect variables in a module from the command
line
Daniel Yoo
dyoo@hkn.eecs.berkeley.edu
Thu, 26 Apr 2001 19:21:33 -0700 (PDT)
On Fri, 27 Apr 2001, Phil Bertram wrote:
> I often develop my programs by writing a class in a module
>
> class MyClass:
> stuff here
>
> if __name__ == '__main__' :
> klass=MyClass()
> klass.mutate()
> print klass.attribute
>
> to run and test scripts written in a module. With print statements for
> debugging. (I press f5 in PythonWin).
>
> Is there a way to switch to the interpreter and inspect the variables in the module
> I've tried thinds like
>
> >>> __main__.klass.anotherAttribute
>
> but can't seem to work it out.
It sounds like you might want to try out the debugger that comes with
PythonWin. However, I have to profess total ignorance about it. *grin*
Does anyone have any experience with PythonWin's debugger?