On Thu, Sep 20, 2012 at 11:48 AM, Keith Rome <r...@wintellect.com> wrote:
> That should be fine. My example was the simplest way possible to spin up a 
> script, so I didn't bother with an explicit scope. But that doesn't change 
> anything really. Also if you re-use the same engine many times, you only 
> really need to wire up the custom output writer once - after initial engine 
> creation.
>
> You can also make the TextWriter slightly smarter and ensure that it only 
> colorizes text that comes from the print function. There isn't a 
> straightforward way to do that, but you can cheat and check the call stack. 
> As long as your code is full-trust then this shouldn't be an issue.
>
> This version might be a little more suitable and complete after seeing your 
> example. I still had to make some assumptions about how your Execute is being 
> handled, but this should at least be fairly close:
>

Wow, Keith! That is amazing, and amazing that you wrote this for us!

I'll give it a try... looks a little sketching diving into the
stack... but this is useful for other uses perhaps also...

Whole lotta thanks!

-Doug
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to