Pipe input to python script and later be able to read user input with inkey
MasterMedo opened this issue · comments
Mislav Vuletić commented
If I were to do cat tmp | python program.py
is there a way to reset the input stream for blessed so the program becomes interactive?
Something like:
term.stdin.close()
term.stdin = os.fdopen(0)
Mislav Vuletić commented
Nevermind, found what you're using in the source. sys.__stdin__ = os.fdopen(1)
does the trick.
Jeff Quast commented
Glad to help :) have fun