title: How to use multiple threads
body: <p>I have this code:</p>
  
  <pre><code>import thread
  
  def print_out(m1, m2):
      print m1
      print m2
      print "\n"
  
  for num in range(0, 10):
      thread.start_new_thread(print_out, ('a', 'b'))
  </code></pre>
  
  <p>I want to create 10 threads, each thread runs the function <code>print_out</code>, but I failed. The errors are as follows:</p>
  
  <pre><code>Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  Unhandled exception in thread started by 
  sys.excepthook is missing
  lost sys.stderr
  </code></pre>