I'm working on a MVC.net website in which I use python script in it. I have a python file which I call it in order to get some results from it. The algorithm has been wrtiten in python and I have to call to get the result. If I want to execute python file, I have to call python.exe file which I call it like below and the result of calling file is string. When I run website locally it works fine but now I want to publish website to server and don't know how to upload python file in it. Second question is that how should I change the path of a python.exe and python file to run on cpanel.
string python = @"C:\Users\Cebit\AppData\Local\Programs\Python\Python37\python.exe";
string myPythonApp = @"C:\Users\Cebit\Desktop\phase2-final.py";
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(python);
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.CreateNoWindow = true;
myProcessStartInfo.RedirectStandardOutput = true;
myProcessStartInfo.RedirectStandardError = true;
List<String> argv = new List<String>();
argv.Add(d1);
argv.Add(m1);
argv.Add(y1);
argv.Add(h1);
argv.Add(min1);
argv.Add(d2);
argv.Add(m2);
argv.Add(y2);
argv.Add(h2);
argv.Add(min2);
argv.Add(favor);
argv.Add(budget.ToString());
myProcessStartInfo.Arguments = string.Format("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12}", myPythonApp, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
Process myProcess = new Process();
myProcess.StartInfo = myProcessStartInfo;
myProcess.Start();
StreamReader myStreamReader = myProcess.StandardOutput;
myProcess.WaitForExit();
string myString = myStreamReader.ReadToEnd();
myProcess.Close();
My question is how should I publish a website which I have to run python.exe and python file in a server. Should I have to do something extra in order to run python.exe file in server ? I'm new to use py script in mvc and don't know how to publish it on cpanel