DebugClients/Python/DebugClientBase.py

branch
5_5_x
changeset 3728
3fd874bf34e4
parent 3621
15f23ed3f216
child 4021
195a471c327b
equal deleted inserted replaced
3726:6b0daa6508f9 3728:3fd874bf34e4
201 self.mainFrame = None 201 self.mainFrame = None
202 self.framenr = 0 202 self.framenr = 0
203 203
204 # The context to run the debugged program in. 204 # The context to run the debugged program in.
205 self.debugMod = imp.new_module('__main__') 205 self.debugMod = imp.new_module('__main__')
206 self.debugMod.__dict__['__builtins__'] = __builtins__
206 207
207 # The list of complete lines to execute. 208 # The list of complete lines to execute.
208 self.buffer = '' 209 self.buffer = ''
209 210
210 # The list of regexp objects to filter variables against 211 # The list of regexp objects to filter variables against
1282 while f is not None and frmnr > 0: 1283 while f is not None and frmnr > 0:
1283 f = f.f_back 1284 f = f.f_back
1284 frmnr -= 1 1285 frmnr -= 1
1285 1286
1286 if f is None: 1287 if f is None:
1287 return 1288 if scope:
1288 1289 dict = self.debugMod.__dict__
1289 if scope: 1290 else:
1291 scope = -1
1292 elif scope:
1290 dict = f.f_globals 1293 dict = f.f_globals
1291 else: 1294 else:
1292 dict = f.f_locals 1295 dict = f.f_locals
1293 1296
1294 if f.f_globals is f.f_locals: 1297 if f.f_globals is f.f_locals:
1325 while f is not None and frmnr > 0: 1328 while f is not None and frmnr > 0:
1326 f = f.f_back 1329 f = f.f_back
1327 frmnr -= 1 1330 frmnr -= 1
1328 1331
1329 if f is None: 1332 if f is None:
1330 return 1333 if scope:
1331 1334 dict = self.debugMod.__dict__
1332 if scope: 1335 else:
1336 scope = -1
1337 elif scope:
1333 dict = f.f_globals 1338 dict = f.f_globals
1334 else: 1339 else:
1335 dict = f.f_locals 1340 dict = f.f_locals
1336 1341
1337 if f.f_globals is f.f_locals: 1342 if f.f_globals is f.f_locals:

eric ide

mercurial