A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/070889.html below:

[Python-Dev] Changing a value in a frame (for a debugger)

[Python-Dev] Changing a value in a frame (for a debugger) [Python-Dev] Changing a value in a frame (for a debugger)Phillip J. Eby pje at telecommunity.com
Wed Feb 7 18:47:00 CET 2007
At 08:11 AM 2/7/2007 -0200, Fabio Zadrozny wrote:
>Would it be ok to add a feature request for that? I initially thought it 
>was completely read-only, but I find it strange that it affects the 
>topmost frame correctly (so, it seems that even though I get a copy, when 
>I alter that copy on the topmost frame it affects it correctly)... anyone 
>has a clue why that happens?

The code that calls the debugging hook calls PyFrame_FastToLocals() before 
invoking the debugger, and then PyFrame_LocalsToFast() afterwards.  Thus, 
the interrupted frame can have its locals modified, but no others can.

In order for this to work on other frames, you'd have to explicitly call 
PyFrame_FastToLocals(frame, 1) -- which you could probably do with ctypes 
or a C extension.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4