title: Python threading global variable issue
body: <p>I have a few scripts that i want to run simultaneously, they read a CSV file,  im trying the following;</p>
  
  <pre><code>import sys
  import csv
  
  out = open("C:\PYDUMP\PYDUMPINST.csv","r")
  dataf=csv.reader(out)
  
  for row in dataf:
      take   = row[0]
      give   = row[1]
  
  
  def example():
  
        try:
            lfo = int(take)
            if lfo &gt; 0:
  
            #code
  
        except Exception, e:
            pass    
  example()
  </code></pre>
  
  <p>This is saved as takefile1.py. I have 20 scripts with similar structures that i want to run simultaneously. So im using(which i have been using for running other batches of scripts trouble free) the following;</p>
  
  <pre><code>import csv
  import sys
  from threading import Thread
  
  
  def firstsend_lot():
  
          execfile("C:\Users\takefile1.py")                                    
  
          execfile("C:\Users\takefile2.py") 
  
  
  def secondsend_lot():  
  
  
          execfile("C:\Users\takefile3.py")                                    
  
          execfile("C:\Users\takefile4.py") 
  
  
  if __name__ == '__main__':
      Thread(target = firstsend_lot).start()
      Thread(target = secondsend_lot).start()
  </code></pre>
  
  <p>So i am getting the error "global name 'take' is not defined". Anyone got any suggestions? Im pretty hopeless at Python so pretend you are talking to an idiot.</p>