Click here to Skip to main content
15,909,091 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am attempting to write a windows forms application in c# which has to call prewritten scripts in python. These scripts are currently accessed using batch files. I need to connect these up to a windows form and capture the output of the python script and write back some parameters to it. I am currently using C# 2010 Express. Any ideas/methods will be highly appreciated.

Regards,
Varun
Posted

Look at the Process class[^]
 
Share this answer
 
Comments
Varun Murali 24-Aug-11 14:24pm    
I have already done that and ensured the batch file is in the \bin folder but the batch file itself compiles and runs the python script but exits immediately if called from a windows form.
You have to set your process object to wait for exit and to capture stdout and stderr. Google is your friend.
 
Share this answer
 
v2

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