title: import silently kills thread
body: <p>I have a simple program <code>Base.py</code> that tests if <code>import</code> is able to throw an exception when the module does not exist.</p>
  
  <pre><code># Base.py
  import threading, os, time
  import_is_working = False
  
  class Launch(threading.Thread):
      def __init__(self):
          threading.Thread.__init__(self)
          self.start()
      def run(self):
          global import_is_working
          try:
              print "Yes, it got into the 'try' block"
              import NON_EXISTENT_MODULE
              assert False
          except:
              print "Great, your python language is working"
              import_is_working = True
  Launch()
  for i in range(500):
      time.sleep(0.01)
      if import_is_working:
          break
  if not import_is_working:
      print "Your import is not working."
      os._exit(4)
  </code></pre>
  
  <p>Sometimes I like to use this code in another module <code>Main.py</code>:</p>
  
  <pre><code># Main.py
  import Base
  </code></pre>
  
  <p>Surprisingly, it doesn't work when I run it that way:</p>
  
  <pre><code>max% python Base.py
  Yes, it got into the 'try' block
  Great, your python language is working
  max% python Main.py
  Yes, it got into the 'try' block
  Your import is not working.
  max%
  </code></pre>
  
  <p>This happens in Ubuntu, and in a clean CentOS 7.3 install too.</p>