title: Python: Can't import a function from another.py file
body: <p>I have a file named handshake.py. Where there is a function send_data(argument). I want to import that function into another file named siptest.py. I am encountering two problems. I am using microsoft visual studio with windows 7, 64-bit.
  1) I can't import function. I have tried using,</p>
  
  <pre><code>from handshake import*
  handshkae.send_data(argument)
  </code></pre>
  
  <p>Which give me an error.</p>
  
  <pre><code>NameError: global name 'handshake' is not defined
  </code></pre>
  
  <p>Another option I have tried is using</p>
  
  <pre><code>import handshake
  handshake.send_data(argument)
  </code></pre>
  
  <p>Which gives me an attribute error.</p>
  
  <pre><code>AttributeError: 'module' object has no attribute 'send_data'
  </code></pre>
  
  <p>If I use it the other way, such as</p>
  
  <pre><code>from handshake import send_data 
  </code></pre>
  
  <p>2) MS Visual studio says. No test discovered, please check the configuration settings but I still can run the test somehow. and it says that the test is failed because of Import Error.</p>
  
  <pre><code>ImportError: cannot import name send_data
  </code></pre>
  
  <p>Both of the said files are in same directory. Plus the function is defined in a class 'TCPhandshake' in handshake.py</p>