PTSV and calling python from C# -
is possible use python tools visual studio in visual studio such allows side side coding of asp.net c# application , python code?
secondly how call python script c#?
thanks in advance.
as running python scripts in c# can this:
processstartinfo start = new processstartinfo(); start.filename = "path/to/python.exe"; start.arguments = string.format("{0} {1}", cmd, args); start.useshellexecute = false; start.redirectstandardoutput = true; using(process process = process.start(start)) { using(streamreader reader = process.standardoutput) { string result = reader.readtoend(); console.write(result); } }
passing python script cmd
, arguments args
.
Comments
Post a Comment