I've searched for a way to do this but have so far not been successful.
My question is similar to this one: How do I run a Python script from C#?
But in my case, the script goes more like this:
def main():
i = raw_input("i = ")
I can redirect the output fine by creating a process like the following:
ProcessStartInfo info = new ProcessStartInfo("cmd", "/c python myFile.py");
How would I send input back to it?
Please note, the python script can be anything. I don't know when an input might be expected so using a streamwriter to write to the process by setting redirectStandardInput to true doesn't work..
Any help would be great. Thanks all!