[Urwid] ANN: PuDB - the Python Urwid Debugger

Ian Ward ian at excess.org
Sat Jun 13 19:00:30 EDT 2009


Andreas Klöckner wrote:
> On Samstag 13 Juni 2009, Ian Ward wrote:
>> Andreas Klöckner wrote:
>>> On Samstag 13 Juni 2009, you wrote:
>>>> Andreas Klöckner wrote:
>>>>> (Resend from subscribed address)
>>>>>
>>>>> On Mittwoch 10 Juni 2009, Ian Ward wrote:
>>>>>> Andreas Klöckner wrote:
>>>>>>> While I'm at it, two questions for Ian:
>>>>>>>
>>>>>>> - I'd love to be able to replace the hardcoded sys.stdout in
>>>>>>> raw_display. Would you take a patch? (This would allow me to
>>>>>>> implement an option to hijack sys.stdout. This would get rid of the
>>>>>>> annoying flicker on every program execution step.)
>>>>>> I encourage patches.  If it's general and useful I might even apply it
>>>>>>
>>>>>> :-)
>>>>> Attached. Let me know what you think.
>>>> What are the usage instructions for this interface?  What streams are
>>>> you likely to want to pass in for term_output_file and term_input_file?
>>> Funnily, sys.stdout and sys.stdin. The point is that I want to hijack
>>> sys.stdin and sys.stdout to capture what goes into and out of them--I
>>> just need Urwid to keep referring to the un-hijacked ones.
>> Ah, that makes sense.
>>
>> How about we just save sys.stdin and sys.stdout when we create the
>> screen (same as your code, just without the __init__ parameters) then
>> someone can change them to whatever they want after creating the screen?
> 
> Also fine. Probably even better for not creating the illusion that redirecting 
> the output to random file-likes is going to work.
> 

Good.  Send me a "hg export" version of that and I will apply it.

Ian




More information about the Urwid mailing list