Question
Like this question, I am new to Python.
I have the following simple program running in Eclipse Juno using PyDev - OSX 10.8.1. I want to pass the stdin stream. If I were doing this on the command line, it would look like this:
python main.py <test_input.txt
How do I add this to my eclipse project settings?
code
import sys def getArgs(): if sys.stdin.isatty(): for line in sys.stdin: print line def main(): getArgs() if __name__ == "__main__": main()
source share