title: How to put constructor contents in another file and execute the content from the class constructor
body: <p>I am working with Tkinter. I have a class. I am configuring rows and columns in the constructor of that class, but I want to put this configuring in an other file and import that.</p>
  <p>My code looks like this :</p>
  <p><strong>main.py</strong></p>
  <pre><code>from tkinter import *
  from tkinter import ttk
  
  
  class Config:
      def __init__(self, root):
      self.root = root
      self.root.columnconfigure(0, weight=1)
      selfroot.rowconfigure(0, weight=1)
  
  root = Tk()
  obj = Config(root)
  root.mainloop()
  
  </code></pre>
  <p>But I want to achieve this :</p>
  <p><strong>main.py</strong></p>
  <pre><code>from tkinter import *
  from tkinter import ttk
  
  
  class Config:
      def __init__(self, root):
      self.root = root
      
  root = Tk()
  obj = Config(root)
  root.mainloop()
  
  </code></pre>
  <p><strong>config.py</strong></p>
  <pre><code>self.root.columnconfigure(0, weight=1)
  selfroot.rowconfigure(0, weight=1)
  </code></pre>