src/eric7/DebugClients/Python/DebugBase.py

branch
eric7
changeset 10275
76a32e9f16b4
parent 10167
0a62a4bf749c
child 10287
0322776373ed
equal deleted inserted replaced
10274:c6b2a22e2337 10275:76a32e9f16b4
166 frame.f_locals returns the last data. 166 frame.f_locals returns the last data.
167 167
168 @param frmnr distance of frame to store locals dictionary to. 0 is 168 @param frmnr distance of frame to store locals dictionary to. 0 is
169 the current frame (int) 169 the current frame (int)
170 """ 170 """
171 cf = self.frameList[frmnr] 171 with contextlib.suppress(IndexError):
172 172 cf = self.frameList[frmnr]
173 with contextlib.suppress(ImportError, AttributeError): 173
174 if "__pypy__" in sys.builtin_module_names: 174 with contextlib.suppress(ImportError, AttributeError):
175 import __pypy__ # __IGNORE_WARNING_I10__ 175 if "__pypy__" in sys.builtin_module_names:
176 176 import __pypy__ # __IGNORE_WARNING_I10__
177 __pypy__.locals_to_fast(cf) 177
178 return 178 __pypy__.locals_to_fast(cf)
179 179 return
180 ctypes.pythonapi.PyFrame_LocalsToFast(ctypes.py_object(cf), ctypes.c_int(0)) 180
181 ctypes.pythonapi.PyFrame_LocalsToFast(ctypes.py_object(cf), ctypes.c_int(0))
181 182
182 def step(self, traceMode): 183 def step(self, traceMode):
183 """ 184 """
184 Public method to perform a step operation in this thread. 185 Public method to perform a step operation in this thread.
185 186

eric ide

mercurial