title: Python Threading String Arguments
body: <p>I have a problem with Python threading and sending a string in the arguments.</p>
  
  <pre><code>def processLine(line) :
      print "hello";
      return;
  </code></pre>
  
  <p>.</p>
  
  <pre><code>dRecieved = connFile.readline();
  processThread = threading.Thread(target=processLine, args=(dRecieved));
  processThread.start();
  </code></pre>
  
  <p>Where dRecieved is the string of one line read by a connection. It calls a simple function which as of right now has only one job of printing "hello".</p>
  
  <p>However I get the following error</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Python25\lib\threading.py", line 486, in __bootstrap_inner
  self.run()
  File "C:\Python25\lib\threading.py", line 446, in run
  self.__target(*self.__args, **self.__kwargs)
  TypeError: processLine() takes exactly 1 arguments (232 given)
  </code></pre>
  
  <p>232 is the length of the string that I am trying to pass, so I guess its breaking it up into each character and trying to pass the arguments like that. It works fine if I just call the function normally but I would really like to set it up as a separate thread.</p>