0

I'm looking for a way to directly interact with the python shell from .NET/C#. I know that I can run the python script using process in .NET, but I'm looking for a way to do the interactive way as we do with python shell.

For eg.,

>>> a=10
>>> b=20
>>> a+b
30
>>>

I want to input such 'a=10','b=20','a+b' as string from C# or .NET to the python shell and read-out the python output '30' from the shell. If any one knows idea to do this, please help.

Ajay
  • 33
  • 1
  • 5
  • Take a look at this [link](https://stackoverflow.com/questions/206323/how-to-execute-command-line-in-c-get-std-out-results) – M.B. Mar 21 '19 at 07:23
  • @Innominatum I have tried the *Process* and *StartInfo* but it doesn't helps for the shell. It works for command line but not for shell. Shell goes into some other mode where this process and startinfo doesn't works. – Ajay Mar 22 '19 at 07:09

0 Answers0