c# - Python sees property as function -
i have library written in c# , goes this
class foocollection { private readonly foobase _innerfoo; public foocollection() { _innerfoo = new foobase(); } public string this[int index] { { return _innerfoo._components[index].componentname; } set { _innerfoo._components[index].componentname = value; } } }
and class com visible , i'm trying use python. so, command works
foo(1)
but 1 doesn't
foo(1) = 'somename'
it gives me "can't assign call function". tried square brackets [], no good. there way bypass this, except me making additional 'normal' method in c# set property?
i'm using pywin32-218 com in python.
foo = win32com.client.dispatch("foo")
indexed property translates il
,
foocollection.get_item
, foocollection.set_item
, probabbly in final com object translated too.
try use these function calls.
hope helps.
Comments
Post a Comment