title: python importing relative modules
body: <p>I have the Python modules a.py and b.py in the same directory.
  How can I reliably import b.py from a.py, given that a.py may have been imported from another directory or executed directly? This module will be distributed so I can't hardcode a single path.</p>
  
  <p>I've been playing around with <code>__file__</code>, sys.path and os.chdir, but it feels messy. And <code>__file__</code> is not always available.</p>