
stephan at pcrm
Apr 26, 1999, 11:28 PM
Post #2 of 2
(50 views)
Permalink
|
Thooney Millennier <thooney [at] pk> writes: > > import sys > sys.stdout = StdoutCatcher() > print 'foo' > > I am at a loss how to redirect standard input. > If you know any solutions,Please Help! Well, I tried the obvious analog of this code snippet: import sys sys.stdin = open("one_of_my_files.txt") print raw_input() And it seemded to work fine. Am I missing something? Greetings, Stephan
|