title: Argv - String into Integer
body: <p>I'm pretty new at python and I've been playing with argv. I wrote this simple program here and getting an error that says :</p>
  
  <blockquote>
    <p>TypeError: %d format: a number is required, not str</p>
  </blockquote>
  
  <pre><code>from sys import argv
  
  file_name, num1, num2 = argv
  int(argv[1])
  int(argv[2])
  def addfunc(num1, num2):
      print "This function adds %d and %d" % (num1, num2)
      return num1 + num2
  
  addsum = addfunc(num1, num2)
  print "The final sum of addfunc is: " + str(addsum)
  </code></pre>
  
  <p>When I run filename.py 2 2, does argv put 2 2 into strings? If so, how do I convert these into integers?</p>
  
  <p>Thanks for your help.</p>