R
riquito
I googled around, but couldn't understand how to solve this problem.
I have 2 scripts
# script1.py #
print 'something'
#script2.py
x=sys.stdin.read()
print 'passed'
if I run
script1.py | script2.py
all goes well.
But if I run just
script2.py
the program blocks waiting forever for input.
On *nix I used select.select 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,
Riccardo
I have 2 scripts
# script1.py #
print 'something'
#script2.py
x=sys.stdin.read()
print 'passed'
if I run
script1.py | script2.py
all goes well.
But if I run just
script2.py
the program blocks waiting forever for input.
On *nix I used select.select 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,
Riccardo