0

So I'm using ironpython to call in the app.py and run the script, It prints the result in the console, but I can't seem to get it in a variable, or even just a simple label in windows forms. Is there even a way to do accomplish this?

My code is:

var engine = Python.CreateEngine();

var app = engine.ExecuteFile("app.py");

The python app is just a simple Hello world code, but I'm going to change it in the future.

  • Something something mumble “capture stdout from IronPython ExecuteFile”. – user2864740 Dec 07 '19 at 21:33
  • As a search of such leads to https://stackoverflow.com/q/3055002/2864740 as one approach.. they should teach this stuff in school. – user2864740 Dec 07 '19 at 21:35
  • Does this answer your question? [How can I redirect the stdout of IronPython in C#?](https://stackoverflow.com/questions/3055002/how-can-i-redirect-the-stdout-of-ironpython-in-c) – AMC Dec 08 '19 at 01:29
  • Have you done any research on the subject? – AMC Dec 08 '19 at 01:30

0 Answers0