title: Why do I get TypeError in Threading in Python
body: <p>I've got the following code which is based off an example i found here on SO, but when i run it i get an error. Please help, i'm sure its very simple:</p>
  
  <pre><code>def listener(port):
      sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      sock.bind(('',port))
      sock.settimeout(1) # n second(s) timeout
      try:
          while True:
              data, addr = sock.recvfrom(1024)
              print data
      except socket.timeout:
          print 'Finished'
  
  def startListenerThread(port):
      threading.Thread(target=listener, args=(port)).start()
  </code></pre>
  
  <p>The error i get is:</p>
  
  <pre><code>Exception in thread Thread-1:
  Traceback (most recent call last):
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner
      self.run()
    File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 477, in run
      self.__target(*self.__args, **self.__kwargs)
  TypeError: listener() argument after * must be a sequence, not int
  </code></pre>