Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to call a Python Script from C#.net using Process.start
Posted
Comments
Kornfeld Eliyahu Peter 11-Feb-14 3:27am    
Have you done anything so far? Show some effort (code or searching)! As is it ain't a question...

Try this:
C#
Process.Start("yourPythonInterpreter.exe", "file.py");

If you don't have a Python interpreter, then you need to install it. And if the path to your Python file contains spaces, then you need to put it into quotes:
C#
Process.Start("yourPythonInterpreter.exe", "\"file with spaces.py\"");
 
Share this answer
 
 
Share this answer
 
refer...

link1
link2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900