title: Python Eclipse Pipe
body: <h2>Question</h2>
  <p>Like <a href="https://stackoverflow.com/questions/4355721/passing-command-line-argument-to-python-script-within-eclipsepydev">this</a> question, I am new to Python.</p>
  <p>I have the following simple program running in Eclipse Juno using PyDev - OSX 10.8.1. I want to pass a <code>stdin</code> stream. If i were running this in the comand line it would look as follows:</p>
  <blockquote>
  <p>python main.py &lt; test_input.txt</p>
  </blockquote>
  <p><strong>How do I go about adding this to the parameters for my eclipse project?</strong></p>
  <br />
  <h2>Code</h2>
  <pre><code>import sys
  
  def getArgs():
      if sys.stdin.isatty():
          for line in sys.stdin:
              print line
  
  def main():
      getArgs()
  
  if __name__ == &quot;__main__&quot;:
      main()
  </code></pre>