title: Python/Cython trouble importing files and methods
body: <p>There are 2 issues both relating to importing that may or may not be cython related?</p>
  
  <p>I have the following simplified files to recreate the problem.  All files are in the same directory.  The .pyx files have successfully compiled into <code>*.so</code>, <code>*.pyc</code> and <code>*.c</code> files.</p>
  
  <p>setup.py:</p>
  
  <pre><code>from distutils.core import setup
  from Cython.Build import cythonize
  
  setup(
      ext_modules=cythonize("*.pyx"),
  )
  </code></pre>
  
  <p>cy1.pyx: (cython)</p>
  
  <pre><code>cdef int timestwo(int x):
      return x * 2
  </code></pre>
  
  <p>cy1.pxd:</p>
  
  <pre><code>cdef int timestwo(int x)
  </code></pre>
  
  <p>cy3.py: (normal python)</p>
  
  <pre><code>def tripleit(x):
      return x*3
  </code></pre>
  
  <p>go.py:</p>
  
  <pre><code>from cy1 import timestwo
  print str(timestwo(5))
  </code></pre>
  
  <p>Gives me the error:  ImportError: cannot import name timestwo</p>
  
  <p>if I change it to:</p>
  
  <p>go.py:</p>
  
  <pre><code>import pyximport; pyximport.install()
  import cy1
  print str(cy1.timestwo(5))
  </code></pre>
  
  <p>it tells me: AttributeError: 'module' object has no attribute 'timestwo'</p>
  
  <p>if I take out the cython all together and try to use normal python call from cy3.py:</p>
  
  <p>go.py:</p>
  
  <pre><code>import cy3
  print str(cy3.tripeleit(3))
  </code></pre>
  
  <p>I get: AttributeError: 'module' object has no attribute 'tripeleit'</p>
  
  <p>and last if I do:</p>
  
  <p>go.py:</p>
  
  <pre><code>from cy3 import tripleit
  print str(tripeleit(3))
  </code></pre>
  
  <p>I get: </p>
  
  <pre><code>NameError: name 'tripeleit' is not defined
  </code></pre>
  
  <p>Sorry if this is super basic but I cannot seem to figure it out.</p>