title: Is it possible to overload from/import in Python?
body: <p>Is it possible to overload the from/import statement in Python?</p>
  
  <p>For example, assuming <code>jvm_object</code> is an instance of class <code>JVM</code>, is it possible to write this code:</p>
  
  <pre><code>class JVM(object):
  
    def import_func(self, cls):
      return something...
  
  jvm = JVM()
  
  # would invoke JVM.import_func
  from jvm import Foo
  </code></pre>