Ahh, we'll want to consider routing that output through sys as well - it's a 
little more complicated for the super console though.

Do you want to help develop Dynamic languages on CLR? 
(http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Szymon Kobalczyk
Sent: Thursday, April 27, 2006 10:10 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Generated IL is always using the standard input, 
output and error streams.

Dino Viehland napisaƂ(a):
>
> The engine does have a SetStderr / SetStdout / SetStdin API which should be 
> used for this purpose.  And the nice thing is as we rev to the multi-System 
> state module this API will remain unchanged so you won't be broken in the 
> future.
>
Note that I the sample I've sent you, I use this API in
PythonConsole_Load to initialize it with TexboxStreams like this:

                engine = new PythonEngine();
                engine.MyConsole = this;

                engine.SetStdout(new TextboxStream(this.output, false));
                engine.SetStderr(new TextboxStream(this.output, true));

This API is the preferred way to get output from IronPython code. But
when you create a console there is additional text that engine may want
to output like command prompts. For this I also implement IConsole
interface on the PythonConsole  control. It also allows the engine to
collect interactive input.
Szymon.




_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to