prog1 | prog2 . How not to make prog2 block if not piped?

riquito at riquito at
Wed Jun 14 17:13:04 CEST 2006

I googled around, but couldn't understand how to solve this problem.
I have 2 scripts

# #
print 'something'
print 'passed'

if I run |
all goes well.

But if I run just
the program blocks waiting forever for input.

On *nix I used to solve this problem, but on windows?
I read that maybe I should use, from win32api, GetStdHandle and
WaitForMultipleObjects, but how to do it it's far from my knowledge.

Any help?

Thank you,

More information about the Python-list mailing list