title: python Returning data from a threaded def
body: <p>I have a bit of code that gets the title of a .MP3 file</p>
  
  <pre><code>def getTitle(fileName):
      print "getTitle"
      audio = MP3(fileName)
  
      try:
          sTitle = str(audio["TIT2"])
      except KeyError:
          sTitle = os.path.basename(fileName)
  
      sTitle = replace_all(sTitle) #remove special chars
  
      return sTitle
  </code></pre>
  
  <p>I would call this function with</p>
  
  <pre><code>sTitle = getTitle("SomeSong.mp3")
  </code></pre>
  
  <p>To solve another problem I wanted to spawn this on its own thread so I altered my call to </p>
  
  <pre><code>threadTitle = Thread(target=getTitle("SomeSong.mp3"))
  threadTitle.start()
  </code></pre>
  
  <p>This correctly calls the function and solves my other problem, but now I can't figure out how to get the return value of sTitle from the function into Main.</p>