Redirecting stdout/err under win32 platform
Pierre Barbier de Reuille
pierre.barbier at cirad.fr
Thu Feb 3 02:15:46 EST 2005
David Douard a écrit :
> Alan,
>
> I did search Google for this problem (not enough, thou).
> In fact, I found some kind of solution (by myself, not that much on Google),
> but it is not really satisfactory.
>
> I have used win32 pipes to do so (win32api.CreatePipe). I can redirect
> stdout/stderr to it from my python code (even redirecting the stdout/stderr
> from my C lib).
> But I still have a problem with this solution (well, 2):
> - it is *much* more complicated than any solution available on Unix like
> systems (not really a problem, but),
> - it not synchronous at all. And I'd like it to be so (or almost so).
>
> David
>
>
>
AFAIK, there is no working bidirectionnal pipes on Windows ! The
functions exists in order for them to claim being POSIX, but they're not
working properly. Under Windows environment, I suppose you have to find
your way using their buggy pipes (and by no means their "POSIX" pipes)
or you have to use another inter-process communication protocol (DDE,
COM, ...).
Pierre
More information about the Python-list
mailing list