How to set a runtime-variable in pdb-session?
rerhol at gmx.de
Tue Nov 6 18:53:57 CET 2001
I'm just trying to set a variable of a script during
a pdb-session. But whatever I do, the variable does
not been setted accordingly.
(1) import pdb
(2) class foo:
(3) def show(self, name_of_var):
(5) x = name_of_var
(6) print x
(7) if __name__ == '__main__':
(8) f = foo()
Running with 'python foo.py' stops at pdb.set_trace();
after entering one 'n', the current line will be (5).
Now I want to change the value of name_of_var to
I don't know how to evaluate that local variable
to a specific value on-time.
Do you have any ideas or knowledge?
More information about the Python-list