title: Is there a way to get the name of the 'parent' module from an imported module?
body: <p>I'm curious if it's possible to access the name of the parent module that some other module is imported into. </p>
  
  <p>For instance, if I have a module (<code>moduleA</code>) and a parent is module, <code>foo.py</code>, into which it will be imported into, is it possible for <code>moduleA</code> to know where <code>foo</code> is located ? </p>
  
  <h3>ModuleA</h3>
  
  <pre><code>def print_parent_module(): 
      os.path.asbpath(#somehow access filename of parent module) 
  </code></pre>
  
  <h3>foo.py</h3>
  
  <pre><code>import moduleA 
  
  print moduleA.print_parent_module()
  &gt;&gt;&gt; "foo.py"
  </code></pre>