title: update class label outside class
body: <pre><code>def check_file_type():
      test = Gui()
      test.info_label['text'] = ''
      inputpath = r'C:\...'
      files = (file for file in os.listdir(inputpath) if os.path.isfile(os.path.join(inputpath, file)))
      for file in files:
          if file.endswith('.pdf'):
              pass
          else:
              jpg_to_png(file)
  
  ...
  
  class Gui():
      def __init__(self):
          self.gui = tk.Tk()
          self.gui.title('Smart Archive')
          self.gui.geometry('500x500')
  
          self.scan_png_button = tk.Button(self.gui, text='Scan files', relief='groove', command = check_file_type())
          self.scan_png_button.place(x=15, y=15)
          self.info_label = tk.Label(self.gui, text='On Hold')
          self.info_label.place(x=15, y=40)
  </code></pre>
  <p>i'm trying to update &quot;self.info_label&quot; from outside class, using Gui().info_lable['text'] but i got this error:</p>
  <pre><code>RecursionError: maximum recursion depth exceeded while calling a Python object
  </code></pre>
  <p>so... is there a method to update a label outside a class?</p>