[Python.NET] About PythonEngine.RunString

Eugene admin at diamondturning.kiev.ua
Mon Jan 23 09:09:29 CET 2006


Hello All!
I'm new in C#. Now I try embed Python in my C# prog.
I wrote

public partial class Form1 : Form
    {
        PyObject m;
        string ans="none";
        public Form1()
        {
            InitializeComponent();
            PythonEngine.Initialize();
            m =PythonEngine.RunString("2+3");
            ans = m.ToString;    <- How i can eval answer from RunString?!
            label1.Text = ans;
        }
        
when i debug and see the m variable - watch say m=Null
why?! what i'm doing wrong?!

Thanks!
    }


More information about the PythonDotNet mailing list