Guys,

I have some problem changing method locals with pdb:

import pdb

def test():
   foo = 'foo'
   pdb.set_trace()

test()
--Return--
> /home/jeanmichel/trunk/tnt/test.py(5)test()->None
-> pdb.set_trace()
(Pdb) print foo
foo
(Pdb) foo = 'bar'
(Pdb) print foo
foo
(Pdb)

I tried using locals() but it returns a copy of the locals. So changing locals['foo'] won't do any good.
(Pdb) locals()
Out[6]: {'__return__': None, 'foo': 'foo'}


Any idea ? I'm starting to wonder if it is possible.

JM
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to