title: python sys.argv differentiate int and string
body: <p>Simply put, how can I differentiate these two in test.py:</p>
  
  <pre><code>python test.py 1
  python test.py '1'
  </code></pre>
  
  <p>Workaround is OK.</p>
  
  <hr>
  
  <h2>Edit:</h2>
  
  <ol>
  <li>This workaround looks cool but too complex: <a href="http://docs.python.org/library/argparse.html#module-argparse" rel="nofollow">argparse</a></li>
  <li>Let the invoker specify args later, in python code use <code>arg = input('Please enter either an integer or a string')</code></li>
  <li>And other workarounds as presented in the answers of this question.</li>
  </ol>
  
  <p>Thank you all for the replies. Every body +1.</p>