private void button1_Click(object sender, EventArgs e)
{
if (engine == null)
{
engine = new PythonEngine();
engine.Globals["win"] = this;
System.IO.FileStream fs = new System.IO.FileStream("scripting-log.txt",
System.IO.FileMode.Create);
engine.SetStandardOutput(fs);
}
try
{
engine.ExecuteFile("test.py");
}
catch (Exception exp)
{
MessageBox.Show(exp.ToString());
}
}