2015-09-26 80 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