[IronPython] Hosting question

Slide slide.o.mix at gmail.com
Thu Jul 27 23:47:06 CEST 2006


On 7/27/06, Ryan Dawson <rdawson at exchange.microsoft.com> wrote:
> Right, the Evaluate* methods are just for expressions.
>
> Locally, I'm not seeing extra new lines being appended to the end of output.  That's not to say we don't have a bug here, we might.  Can you provide some more information?
>
> This happens on a simple "print 3"?  We should be writing "3"+Environment.NewLine.  How are you reading from the memory stream?
>
> Thanks,
>         -Ryan
>
>


I created a class I called PythonOutputStream that inherits from
Stream, internally it has a MemoryStream. I set the stdout of the
PythonEngine to one of these. In the Flush method of the
PythonOutputStream, I grab all the data from the stream and then fire
an event with the text from the stream and reset it. I see the flush
being called several times after the initial output of "3" in the
example of "print 3". I tried moving the output of data into the Write
method, but the same thing occurs, I still get a couple "\r\n"s after
the initial output.

Thanks,

Alex



More information about the Ironpython-users mailing list