Streaming Ironpython output to my editor
We embed ironpython in our app sob that scripts can be executed in the context of our application.

I use Python.CreateEngine() and ScriptScope.Execute() to execute python scripts.

We have out own editor(written in C#) that can load ironpython scripts and run it.

There are 2 problems I need to solve.

1. If I have a print statement in ironpython script, how can i show it my editor(how will I tell python engine to redirect output to some handler in my C# code)

2. I plan to use unittest.py for running unittest. When I run the following 
runner = unittest.TextTestRunner()
runner.run(testsuite)

the output is redirected to standard output but need a way for it to be redirected to my C# editor output window so that user can see the results.
This question might be related to 1

Any help is appreciated
G

       

Streaming Ironpython output to my editor
===

We embed ironpython in our app sob that scripts can be executed in the context of our application.

I use Python.CreateEngine() and ScriptScope.Execute() to execute python scripts.

We have out own editor(written in C#) that can load ironpython scripts and run it.

There are 2 problems I need to solve.

1. If I have a print statement in ironpython script, how can i show it my editor(how will I tell python engine to redirect output to some handler in my C# code)

2. I plan to use unittest.py for running unittest. When I run the following 
runner = unittest.TextTestRunner()
runner.run(testsuite)

the output is redirected to standard output but need a way for it to be redirected to my C# editor output window so that user can see the results.
This question might be related to 1

Any help is appreciated
G

       
