DebugClients/Python/DebugBase.py

changeset 5587
ea526b78ee6c
parent 5582
d829281d439f
child 5616
adcffadf4962
diff -r 0e5421d679e7 -r ea526b78ee6c DebugClients/Python/DebugBase.py
--- a/DebugClients/Python/DebugBase.py	Tue Mar 07 18:46:09 2017 +0100
+++ b/DebugClients/Python/DebugBase.py	Tue Mar 07 18:53:18 2017 +0100
@@ -421,25 +421,25 @@
             sys.settrace(None)
             sys.setprofile(None)
     
-    def run(self, cmd, globals=None, locals=None, debug=True):
+    def run(self, cmd, globalsDict=None, localsDict=None, debug=True):
         """
         Public method to start a given command under debugger control.
         
         @param cmd command / code to execute under debugger control
         @type str or CodeType
-        @keyparam globals dictionary of global variables for cmd
+        @keyparam globalsDict dictionary of global variables for cmd
         @type dict
-        @keyparam locals dictionary of local variables for cmd
+        @keyparam localsDict dictionary of local variables for cmd
         @type dict
         @keyparam debug flag if command should run under debugger control
         @type bool
         """
-        if globals is None:
+        if globalsDict is None:
             import __main__
-            globals = __main__.__dict__
+            globalsDict = __main__.__dict__
         
-        if locals is None:
-            locals = globals
+        if localsDict is None:
+            localsDict = globalsDict
         
         if not isinstance(cmd, types.CodeType):
             cmd = compile(cmd, "<string>", "exec")
@@ -452,7 +452,7 @@
             sys.settrace(self.trace_dispatch)
         
         try:
-            exec(cmd, globals, locals)
+            exec(cmd, globalsDict, localsDict)
             atexit._run_exitfuncs()
             self._dbgClient.progTerminated(0)
         except SystemExit:

eric ide

mercurial