dwmkerr / consolecontrol

ConsoleControl is a C# class library that lets you embed a console in a WinForms or WPF application.
MIT License
723 stars 169 forks source link

Unable to launch Python in console #17

Open amas008 opened 9 years ago

amas008 commented 9 years ago

I am looking for a console application that will support Python. Your code looks great, but fails to work with Python.exe (v2.7.8). There is no output produced from Python, and an "Argument out of range" exception is generated when entering a command (which is echoed correctly) and then pressing return (which causes the exception). Is there some limitation on what exe's can be run using a C# console? I cannot find any consoles written in C# that will run Python. Thanks, Andrew

amas008 commented 9 years ago

I solved this; Python, Julia and other programmes change their behaviour if their STDIN and STDOUT is redirected. They need to be launched with a "-i" argument to work.

dwmkerr commented 9 years ago

Cool, I'll update the documentation to reflect this :)

taylorycring commented 9 years ago

I have then same problem.

thinak @amas008 's soluction ^__^