title: python - calling variable from another function
body: <p>iam working on tkinter iam using filedialog to upload file my target is to have tow button.
  button1 for uploading txt file
  button2 is for processing the file see my current function setup</p>
  
  <pre><code>class procFile:
      def uploadFile(self, filename):
          self.filename = filename
  
      def displayName(self):
          return self.filename
  
      def filePath(self):
          print("%s" %self.filename)
  
  def main():
      upload = procFile()
      upload.uploadFile(filedialog.askopenfilename(filetypes=(('txt', '*.txt'), ('All Files', '*.*'))))
      upload.filePath()
  </code></pre>
  
  <p>Please i need to another button to fireup another function which will access the variable from main function</p>