0
我有以下的C#代碼IronPython的增加命名空間範圍在C#
namespace API
{
public class AutoRcu
{
private ...
public AutoRcu()
{
...
}
public void pressKey(string name)
{
...
}
...
}
我運行下面的IronPython代碼運行的C#代碼。
rcu.pressKey("Menu")
THS工作正常,但問題是:
我想改變的Python API來運行:的
API.rcu.pressKey()
代替
rcu.pressKey()
如何做到這一點?
現在我用
pyScope.SetVariable("rcu",AutoRcu)
功能添加這樣的類。
謝謝。工作正常。 – Przemo