管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2022-11-08 d6e6dd4ac9719c491bf9d570c87ece759b0fbc6a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Web;
 
namespace LFServer.cs
{
    public class ExportUtil
    {
        public static void ExecPython(string py, string qgz, string qpt)
        {
            try
            {
                string args = string.Format("{0} -qgz {1} -qpt {2}", py, qgz, qpt);
 
                Process p = new Process();
                p.StartInfo.UseShellExecute = false;
                p.StartInfo.ErrorDialog = true;
                p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                p.StartInfo.RedirectStandardError = false;
                p.StartInfo.FileName = "python";
                p.StartInfo.Arguments = args;
                p.StartInfo.CreateNoWindow = true;
 
                p.Start();
            }
            catch
            {
            }
        }
    }
}