title: Import a python module without the .py extension
body: <p>I have a file called foobar (without .py extension). In the same directory I have another python file that tries to import it:</p>
  
  <pre><code>import foobar
  </code></pre>
  
  <p>But this only works if I rename the file to foobar.py. Is it possible to import a python module that doesn't have the .py extension?</p>
  
  <p>Update: the file has no extension because I also use it as a standalone script, and I don't want to type the .py extension to run it. </p>
  
  <p>Update2: I will go for the symlink solution mentioned below.</p>