zoukankan      html  css  js  c++  java
  • python study demo

    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();
            }
        }
    }

  • 相关阅读:
    MZOJ #72 数字
    MZOJ #71 maple做数学题
    MZOJ #70 FFF团
    luogu 2051 [AHOI2009]中国象棋
    uva 280
    uva 260
    文件的基本处理
    文件的基础
    Turtle库
    π的计算
  • 原文地址:https://www.cnblogs.com/chuncn/p/1779658.html
Copyright © 2011-2022 走看看