Hi,

I have implemented some piece of code that should execute a python-script. In 
this script I want to call a c#-function.
First, I Generate a module (context to work in):

 _scriptRuntime.Start(true);
 _scriptRuntime.ScriptScope.SetVariable("class", this); ('this' is CClassName')

Then I get the class:

PythonType pType = _scriptRuntime.ScriptScope.GetVariable("CClassName") as 
PythonType;

Create an instance of the object

_Class = _scriptRuntime.ScriptScope.Engine.Operations.CreateInstance(pType, new 
object[] { });

[...] (do some other tings)

>From the python script, I want to call the function:

return class.doSomething(parameter)

The code throws an exception:

'CClassName' object has no attribute 'doSomething'.

What am I making wrong? CClassName has a public method doSomething()

Thanks for U're help.

Greetings
Georg Eichhorn

________________________________
The information contained in this message may be confidential and legally 
protected under applicable law. The message is intended solely for the 
addressee(s). If you are not the intended recipient, you are hereby notified 
that any use, forwarding, dissemination, or reproduction of this message is 
strictly prohibited and may be unlawful. If you are not the intended recipient, 
please contact the sender by return e-mail and destroy all copies of the 
original message.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to