title: python not recognizing function within imported module
body: <p>I am working in Jupyter notebook. I created a simple module called conv.py for converting miles to km. When I try to import this module in a separate code (in the same directory) the import seems to go successfully but it doesn't recognize either of the functions I defined in the 'conv' module.</p>
  <p>I have imported os and os.getcwd() provides the correct folder for conv.py...</p>
  <p><strong>code for conv.py</strong></p>
  <pre><code> in_n_ft = 12
   ft_n_mile = 5280
   m_n_km = 1000
   cm_n_in = 2.54
   cm_n_m = 100
   mm_n_m = 1000
   def ft_to_km(feet):
       return feet*in_n_ft*cm_n_in/cm_n_m/m_n_km
   print(ft_to_km(5280))
   def mil_to_km(mile):
       return mile*ft_n_mile*in_n_ft*cm_n_in/cm_n_m/m_n_km
      
   print(mil_to_km(3.2)) 
  </code></pre>
  <p><strong>Code for new module</strong></p>
  <pre><code> import conv
   km = conv.mil_to_km(5) 
  </code></pre>
  <p><strong>Error provided</strong></p>
  <hr />
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-111-bfd778724ae2&gt; in &lt;module&gt;
        3 import conv
        4 
  ----&gt; 5 km = conv.mil_to_km(5)
  AttributeError: module 'conv' has no attribute 'mil_to_km'
  </code></pre>
  <p>When I type</p>
  <pre><code>dir(conv)
  </code></pre>
  <p>I get</p>
  <pre><code>['__builtins__',
   '__cached__',
   '__doc__',
   '__file__',
   '__loader__',
   '__name__',
   '__package__',
   '__spec__']
  </code></pre>
  <p>What am I doing wrong?</p>
  <p><em><strong>EDIT</strong></em></p>
  <p>I have also tried</p>
  <pre><code>from conv import mil_to_km
  </code></pre>
  <p>when I do that I get a different error</p>
  <pre><code>cannot import name 'mil_to_km' from 'conv' (C:\Users\223023441\Documents\python\conv.py)
  </code></pre>
  <p>I have also queried the module using:</p>
  <pre><code>from inspect import getmembers, isfunction
  import conv
  
  print(getmembers(conv, isfunction))
  </code></pre>
  <p>from here I get:</p>
  <pre><code>['__builtins__',
   '__cached__',
   '__doc__',
   '__file__',
   '__loader__',
   '__name__',
   '__package__',
   '__spec__']
  </code></pre>
  <p>I am also unable to access any of the variables within the conv.py file after import... Am I doing something wrong when I save the py file? Jupyter makes ipynb as the common file, when I 'save as' to conv.py, is this screwing it up?</p>