title: Multi-Threaded Program Not Returning to Main Thread Immediately
body: <p><strong>Challenge</strong></p>
  
  <p>I have a program I wrote that uses two threads. One thread changes the color of the text and the background of the command prompt. The other thread displays a help menu or loops through a list of 1000 numbers. The problem is I want the program to return to the prompt and wait for new instructions instead of cycling through the color spectrum. What I would like is for the program to cycle through the color spectrum and also wait for the end-user to type something else at the command prompt. Is this not possible? This program will unfortunately only work on the Windows operating-system (OS). </p>
  
  <p>Additionally, I cannot even Control-C out of the program if I want to because the thread I create will not listen for input apparently. Strange. </p>
  
  <p><strong>The Code</strong></p>
  
  <pre><code>import os
  import getopt
  import time
  import sys
  import threading
  
  
  def whiteRabbit():
      """Change the color of the command prompt while the program is executing."""
  
      for i in range(60):
          os.system('color %d' % i)
          time.sleep(1)
  
  def goGoGo():
      for i in range(1000):
          print("Hey we have another number, %d " % i)
  
  def howTo():
      print("Here are the options for this program")
      print ("%s -h (help menu. What you are reading now.)" % sys.argv[0])
      print("%s -g (goGoGo() mode. This prints a list of numbers to the console. Wow. :0" % sys.argv[0])
      print("%s --whiteRabbit (This changes the color of the console. Windows only. Sorry cool Unix people." % sys.argv[0])
  
  
  
  if __name__ == "__main__":
  
      try:
          opts, args = getopt.gnu_getopt(sys.argv[1:], 'hg', ['whiteRabbit'])
  
          for opt, arg in opts:
  
              if opt in ('-h'):
                  howTo()
              elif opt in ('-g'):
                  goGoGo()
              elif opt in ('--whiteRabbit'):
                  wr = threading.Thread(target=whiteRabbit)
                  wr.start()
  
      except getopt.GetoptError as crap:
          howTo()
  </code></pre>