Process Class (System.Diagnostics)

Posted jebediahkerman

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Process Class (System.Diagnostics)相关的知识,希望对你有一定的参考价值。

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)的主要内容,如果未能解决你的问题,请参考以下文章

IDEA 找不到测试类:Process finished with exit code 1 Class not found

Laravel queue worker can't process jobs # 错误日志 local.ERROR: Class does not exist "exception&quo

Process子类

The Process class relies on proc_open,which is not available on your php installation

tomcat请求响应代码分享

Process Pool实现Python的并行执行