3726:6b0daa6508f9 | 3728:3fd874bf34e4 |
---|---|
175 self.mainFrame = None | 175 self.mainFrame = None |
176 self.framenr = 0 | 176 self.framenr = 0 |
177 | 177 |
178 # The context to run the debugged program in. | 178 # The context to run the debugged program in. |
179 self.debugMod = imp.new_module('__main__') | 179 self.debugMod = imp.new_module('__main__') |
180 self.debugMod.__dict__['__builtins__'] = __builtins__ | |
180 | 181 |
181 # The list of complete lines to execute. | 182 # The list of complete lines to execute. |
182 self.buffer = '' | 183 self.buffer = '' |
183 | 184 |
184 # The list of regexp objects to filter variables against | 185 # The list of regexp objects to filter variables against |
1293 while f is not None and frmnr > 0: | 1294 while f is not None and frmnr > 0: |
1294 f = f.f_back | 1295 f = f.f_back |
1295 frmnr -= 1 | 1296 frmnr -= 1 |
1296 | 1297 |
1297 if f is None: | 1298 if f is None: |
1298 return | 1299 if scope: |
1299 | 1300 dict = self.debugMod.__dict__ |
1300 if scope: | 1301 else: |
1302 scope = -1 | |
1303 elif scope: | |
1301 dict = f.f_globals | 1304 dict = f.f_globals |
1302 else: | 1305 else: |
1303 dict = f.f_locals | 1306 dict = f.f_locals |
1304 | 1307 |
1305 if f.f_globals is f.f_locals: | 1308 if f.f_globals is f.f_locals: |
1336 while f is not None and frmnr > 0: | 1339 while f is not None and frmnr > 0: |
1337 f = f.f_back | 1340 f = f.f_back |
1338 frmnr -= 1 | 1341 frmnr -= 1 |
1339 | 1342 |
1340 if f is None: | 1343 if f is None: |
1341 return | 1344 if scope: |
1342 | 1345 dict = self.debugMod.__dict__ |
1343 if scope: | 1346 else: |
1347 scope = -1 | |
1348 elif scope: | |
1344 dict = f.f_globals | 1349 dict = f.f_globals |
1345 else: | 1350 else: |
1346 dict = f.f_locals | 1351 dict = f.f_locals |
1347 | 1352 |
1348 if f.f_globals is f.f_locals: | 1353 if f.f_globals is f.f_locals: |