stdout custom
castironpi at gmail.com
castironpi at gmail.com
Tue Mar 18 14:58:18 EDT 2008
On Mar 18, 8:51 am, Tim Golden <m... at timgolden.me.uk> wrote:
> castiro... at gmail.com wrote:
> >>> Can I allocate a second console window, so I can place certain output
> >>> to that directly, and leave the original streams alone?
>
> I've rather lost track of what you're trying to do, but I would
> second Gabriel's suggestion of the standard Windows method of
> debug output: using OutputDebugString. There's an example here:
>
> http://timgolden.me.uk/python/win32_how_do_i/capture-OutputDebugStrin...
>
> and it shouldn't be too hard to wrap it in a file-like
> object for stderr-substitution use, say.
>
> Obviously there are 1,001 other ways of doing IPC but since this
> one's ready-made you might as well use it. You can distinguish
> between different processes' outputs by virtue of the PID which
> is the first item on the mmap.
>
> TJG
I want a handle to another window.
Create B with a command.
___ ___
|A | |B |
|___| |___|
B.stdin (the stdin to B).write( '?' )
___ ___
|A | |B? |
|___| |___|
A.stdout.write( '*' )
___ ___
|A* | |B? |
|___| |___|
A big tease is good too.
More information about the Python-list
mailing list