I am try to send the string as command line argument to my python script as follow:
var cmdToBeExecute = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\myScript.py";
var start = new ProcessStartInfo
{
FileName = "C:\\Python27\\python.exe",
Arguments = string.Format("{0} {1}", cmdToBeExecute, "Rahul done good"),
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
};
and i am try to read the command line argument and display it in python as:
import sys
print sys.argv[1]
But, I get only the first word "Rahul" as output. Please help me to send string as command parameter argument to my python script.