Re[2]: [Boa Constr] Db>
Status: Beta
Brought to you by:
riaan
|
From: Paolo I. <pao...@dm...> - 2002-12-12 11:11:31
|
Hello Riaan,
Thursday, December 12, 2002, 2:20:43 AM, you wrote:
RB> Basically no, as you might guess it's eval'ed on the DebuggerServer side
RB> so statements aren't allowed, only expressions.
RB> I'd like to improve this at at some stage. It's a todo.
Thanks for the reply! Tomorrow morning I've given a **fast** look to
IsolatedDebugger...
What's the problem with that diff? It seems quite painless at a first
look...
Index: IsolatedDebugger.py
===================================================================
RCS file: /cvsroot/boa-constructor/boa/Debugger/IsolatedDebugger.py,v
retrieving revision 1.22
diff -u -r1.22 IsolatedDebugger.py
--- IsolatedDebugger.py 26 Apr 2002 16:11:26 -0000 1.22
+++ IsolatedDebugger.py 12 Dec 2002 11:06:16 -0000
@@ -1090,7 +1090,11 @@
else:
try:
globalsDict, localsDict = self.getFrameNamespaces(frame)
- v = eval(expr, globalsDict, localsDict)
+ if expr.startswith("!"):
+ exec expr[1:] in globalsDict, localsDict
+ v="Exec Done!"
+ else:
+ v = eval(expr, globalsDict, localsDict)
return pprint.pformat(v)
except:
t, v = sys.exc_info()[:2]
--
Best regards,
Paolo mailto:pao...@dm...
|