title: Execute multi threaded program in Python to run as single thread
body: <p>I've been using threading class alot in my Python codes and have successfully make a couple routine to run as multi-threaded. The problem is when something fails, it becomes a pain when it comes to debugging. This is what my code block would look like:</p>
  
  <pre><code>threads = []
  for argument in get_file_method():
      thread = threading.Thread(self._routine, argument)
      thread.start()
      threads.append(thread)
  
  # Wait for all threads to complete
  for thread in threads:
      filename = thread.join()
  </code></pre>
  
  <p>The question is, How can I force the program to run as single threaded in order to ease debug.</p>