2015-09-26 87 views

回答

0

您正在使用的库似乎利用内部API来获取当前堆栈/活动对象的信息。 为了提供所需的信息和界面,您必须运行IronPython以及-X:FullFrames参数。

如果您计划从C#this answer托管IronPython,请说明必要的步骤。

而不是以前的情况/错误

C:\Program Files (x86)\IronPython 2.7>ipy 
IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.42000 (32-bit) 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import sys 
>>> sys._getframe(0) 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
AttributeError: 'module' object has no attribute '_getframe' 

你会得到预期的行为

C:\Program Files (x86)\IronPython 2.7>ipy -X:FullFrames 
IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.42000 (32-bit) 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import sys 
>>> sys._getframe(0) 
<frame object at 0x000000000000002B> 
+0

我得到与-X运行IPY以下错误:FullFrames: HTTP:// imgur .com/6vA8LfB – Rahul

+0

是[此问题](http://stackoverflow.com/questions/29683868/c-ironpython-and-sympy-unicode-escape-decode-takes-no-arguments)相关? –

+0

是的,谢谢:) – Rahul