title: threading.Lock() not working through script
body: <p>I'm experimenting with the threading function in python 3 to get my own pingtesting app/log working, so im following a <a href="https://www.youtube.com/watch?v=NwH0HvMI4EA" rel="nofollow">youtube tutorial</a></p>
  
  <p>When I've launched a python 3 interpreter, and run:</p>
  
  <pre><code>&gt;&gt;&gt; import threading
  &gt;&gt;&gt; print_lock = threading.Lock()
  </code></pre>
  
  <p>It correctly returns  </p>
  
  <pre><code>&gt;&gt;&gt; print_lock
  &lt;_thread.lock object at 0x042093C8&gt;
  </code></pre>
  
  <p>But when I use that piece of code in a script and try to run it as</p>
  
  <pre><code>python scriptName.py
  </code></pre>
  
  <p>I get an error saying the attribute Lock() doesn't exist</p>
  
  <pre><code>AttributeError: 'module' object has no attribute 'Lock'
  </code></pre>
  
  <p>How is this possible? I've verified what threading.Lock() returns when running the python interpreter, why isn't it recognized when I try to run it in a script and how can I get this running?</p>