Filtering integers out of python command line arguments
<p>so I wrote a program and I want to pass it either a filename and an integer or just an integer. Whats the best way to determine which argument is the integer? This is what I have:</p>

<pre><code>import sys

if len(sys.argv) &gt; 1):
    for e in sys.argv:
        try:
            bio = map(e, int)
        except:
            pass
</code></pre>

<p>thanks in advance</p>
