using System;
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;
namespace PythonSample
{
class Program
{
static void Main(string[] args)
{
//study1
var scriptEngine = Python.CreateEngine();
scriptEngine.Execute("print \"hello world\"");
Console.WriteLine("press random key,and contiue...");
Console.ReadLine();
//study2
ScriptRuntime py = Python.CreateRuntime();
dynamic helloworld = py.UseFile("helloworld.py");
for (int i = 0; i < 10; i++)
{
Console.WriteLine(helloworld.welcome("Employee #{0}"), i);
}
Console.ReadLine();
}
}
}