title: Pythonic way to use class refernce in another file
body: <p>I have a situation where I want to use class instance declared in one file in second file. As a small example, see the below code :</p>
  
  <p>How I am solving it as of now?</p>
  
  <p>File2 (To be executed):</p>
  
  <pre><code># Prog2:
  from prog1 import *
  
  cls1.dict["name"] = "John"
  </code></pre>
  
  <p>File1</p>
  
  <pre><code># Prog1:
  
  class Myclass(object):
      def __init__(self):
          self.dict = {}
  
  cls1 = Myclass()
  
  import prog2
  print cls1.dict["name"]
  </code></pre>
  
  <p>Is there a better way of doing it?</p>