Checking if sys.argv[x] is defined
<p>Dear All
  What would be the best way to check if a variable was passed along for the script:</p>

<pre><code>try:
    sys.argv[1]
except NameError:
    startingpoint = 'blah'
else:
    startingpoint = sys.argv[1]
</code></pre>

<p>Thanks!</p>
