首页 > 其他 > 详细

Process Class (System.Diagnostics)

时间:2019-01-13 01:10:13      阅读:175      评论:0      收藏:0      [点我收藏+]
import sys


def hanoi(n, a, b, c):
    if n == 1:
        print(%c --> %c % (a, c))
    else:
        hanoi(n-1, a, c, b)
        print(%c --> %c % (a, c))
        hanoi(n-1, b, a, c)


if __name__ == "__main__":
    n = int(sys.stdin.readline())
    hanoi(n, A, B, C)
using System.Diagnostics;

namespace Hanoi
{
    class Program
    {
        static void Main(string[] args)
        {
            Process process = new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    FileName = "python",
                    Arguments = "hanoi.py",
                    UseShellExecute = false
                }
            };
            process.Start();
            process.WaitForExit();
        }
    }
}

 

Process Class (System.Diagnostics)

原文:https://www.cnblogs.com/JebediahKerman/p/Process_Class_System_Diagnostics.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!