Hi,
I'm attempting to get an attribute from python object from C# using a
method like this:
public object GetAttr(object pyObject, string name)
{
ICallerContext context = _pythonEngine.DefaultModule as ICallerContext;
object value = Ops.GetAttr( context, pyObject,
SymbolTable.StringToId(name));
return value;
}
where _pythonEngine is a PythonEngine object, pyObject is a python
object and name is the attribute I want to get.
According to other posts I've seen, this should work, but the first line
sets context to null. How to I get a valid context?
It seems every way I've read about to get the context
(DefaultContext.Default, GetModuleScope) is private, and therefore
inaccessible.
I'm using IPY 1.1.1
TIA, Paul
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com