问题是;
var instance = mScriptScope.GetVariable("Group1"); //here I can get the instance named "Group1" ,type is IronPython.Runtime.Types.OldInstance
mScriptScope.Engine.Execute(context);//but here I excute Group1.Collection1.Tag1 =10 throw an UnBoundNameException : global name 'Group1' is not defined
mScriptScope 是从 .py 文件创建的:
# -*- coding: utf-8 -*-
import RTDBBase
from RTDBBase import *
Group1 = PRTDBTagGroup("Group1")
为什么?