title: Multiple arguments with stdin in Python
body: <p>I have a burning question that concerns passing multiple stdin arguments when running a Python script from a Unix terminal.
  Consider the following command:</p>
  
  <pre><code>$ cat file.txt | python3.1 pythonfile.py
  </code></pre>
  
  <p>Then the contents of <code>file.txt</code> <em>(accessed through the "cat" command)</em> will be passed to the python script as standard input. That works fine <em>(although a more elegant way would be nice)</em>. But now I have to pass another argument, which is simply a word which will be used as a query <em>(and later two words)</em>. But I cannot find out how to do that properly, as the cat pipe will yield errors. And you can't use the standard <code>input()</code> in Python because it will result in an EOF-error <em>(you cannot combine stdin and <code>input()</code> in Python)</em>.</p>