Re: [IronPython] Redirecting stdout/stderr, but with context

2009-02-20 Thread Kamil Dworakowski
:41 PM To: Discussion of IronPython Subject: Re: [IronPython] Redirecting stdout/stderr, but with context Dino Viehland wrote: You can always provide your own stream which is aware of what the currentoutputwindow is.  It could store this in a thread static or just some variable that you

Re: [IronPython] Redirecting stdout/stderr, but with context

2009-01-31 Thread Michael Foord
Jeff Slutter wrote: I have a bit of a problem that I'm not sure how to solve. In my application, I have multiple documents, and each can possibly be performing script operations that print text out via the print function. I have one script output window, which, only shows the output of whichever

Re: [IronPython] Redirecting stdout/stderr, but with context

2009-01-30 Thread Dino Viehland
To: Discussion of IronPython Subject: [IronPython] Redirecting stdout/stderr, but with context I have a bit of a problem that I'm not sure how to solve. In my application, I have multiple documents, and each can possibly be performing script operations that print text out via the print function. I

Re: [IronPython] Redirecting stdout/stderr, but with context

2009-01-30 Thread Jeff Slutter
Dino Viehland wrote: You can always provide your own stream which is aware of what the current output window is. It could store this in a thread static or just some variable that you update whenever the active window changes. You can set that via ScriptRuntime.IO.OutputStream. You could

Re: [IronPython] Redirecting stdout/stderr, but with context

2009-01-30 Thread Dino Viehland
: Friday, January 30, 2009 6:41 PM To: Discussion of IronPython Subject: Re: [IronPython] Redirecting stdout/stderr, but with context Dino Viehland wrote: You can always provide your own stream which is aware of what the current output window is. It could store this in a thread static or just

Re: [IronPython] Redirecting stdout/stderr, but with context

2009-01-30 Thread Jeff Slutter
Aha! That looks like exactly what I need! It will take some tweaking of the code, but this should give me the information I need to route things properly. Now, I just need to find out if I can do something similar for System.Console, but I can live with it if I can't for that one. Python output