Fabio Zadrozny wrote:

> frame = findFrame(thread_id, frame_id)
> exec '%s=%s' % (attr, expression) in frame.f_globals, frame.f_locals

The locals of a function are actually stored in an array.
When you access them as a dict using locals(), all you
get is a dict containing a copy of their current values.
Modifying that dict doesn't affect the underlying array.

It seems that reading the f_locals of a frame does the
same thing. To modify the locals, you would need to poke
values into the original array -- but it doesn't seem
to be exposed to Python.

So it looks like you're out of luck.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to