title: Tkinter Swapping Windows in function
body: <p>I have been searching for examples of this for awhile as it has me stuck. I am trying to create a simple application to bunch a few scripts together to automate some boring stuff for my work. The issue I am facing is that once the first script runs I ask the app to swap windows so the second is displayed allowing me to input my parameters for that part of the script, however upon finishing the first script nothing happens, I get no error but also I get no swap.</p>
  
  <p>All examples I found require you to change the window on button press but I do not want this. The button calls the script method which in turn when finished calls the show_frames method.</p>
  
  <p>I'm pretty sure the issue is with the way I'm calling the show_frames, if anyone could help and point me into the correct direction I'd be very great-full.</p>
  
  <p>I would also like to note this is my first OOP based TKinter app my others have not been OOP based. </p>
  
  <p>Relevant Code:</p>
  
  <pre><code>class bossinit(tk.Tk):
  def __init__(self,*args,**kwargs):
      tk.Tk.__init__(self,*args,**kwargs)
  
      tk.Tk.iconbitmap(self,default="hieta_icon.ico")
      container = tk.Frame(self)
      container.pack(side="top",fill="both",expand=True)
      container.grid_rowconfigure(0,weight=1)
      container.grid_columnconfigure(0,weight=1)
      self.frames = {}
  
      for F in (RenamePage,ProcessPage):
          frame = F(container,self)
          self.frames[F] = frame
          frame.grid(row=0,column=0,sticky="nsew")
      #frame = RenamePage(container,self)
      #self.frames[RenamePage] = frame
      #frame.grid(row=0,column=0,sticky="nsew")
      self.show_frame(RenamePage)
  def show_frame(self,cont):
      frame = self.frames[cont]
      frame.tkraise()
  
  class RenamePage(tk.Frame):
  def __init__(self, parent, controller):
      tk.Frame.__init__(self,parent)
      ttk.Frame.__init__(self,parent)
  
      self.v1 = tk.StringVar()
      v2 = tk.StringVar()
  
      title1 = ttk.Label(self,text="Re-naming Parameters:")
      title1.grid(row=0,column=0,padx=10,pady=10)
      self.dirLabel = ttk.Label(self,text="Working Directory:")
      self.dirLabel.grid(row=1,column=0,padx=10,pady=10)
      self.wdDirRe = ttk.Entry(self,width=40)
      self.wdDirRe.config(state='readonly')
      self.wdDirRe.grid(row=1,column=1,columnspan=2,padx=10,pady=10)
      findDirBut = ttk.Button(self,text="...",command=self.findWdDirectory)
      findDirBut.grid(row=1,column=3,padx=10,pady=10)
      startNumLbl = ttk.Label(self,text="Start Number:")
      startNumLbl.grid(row=1,column=4,padx=10,pady=10)
      self.startNumEnt = ttk.Entry(self,width=5)
      self.startNumEnt.grid(row=1,column=5,padx=10,pady=10)
  
      label = ttk.Label(self,text="Output Directory:")
      label.grid(row=2,column=0,padx=10,pady=10)
      self.outDir = ttk.Entry(self,width=40,textvariable=v2)
      self.outDir.config(state='readonly')
      self.outDir.grid(row=2,column=1,padx=10,pady=10,columnspan=2)
      button = ttk.Button(self,text="...",command=self.findOutDirectory)
      button.grid(row=2,column=3,padx=10,pady=10)
      label = ttk.Label(self,text="End Number:")
      label.grid(row=2,column=4,padx=10,pady=10)
      self.endNumEnt = ttk.Entry(self,width=5)
      self.endNumEnt.grid(row=2,column=5,padx=10,pady=10)
      label = ttk.Label(self,text="Write Start:")
      label.grid(row=3,column=4,padx=10,pady=10)
      self.writeNumEnt = ttk.Entry(self,width=5)
      self.writeNumEnt.grid(row=3,column=5,padx=10,pady=10)
      label = ttk.Label(self,text="Prefix:")
      label.grid(row=3,column=0,pady=10)
      self.prefix = ttk.Entry(self,width=5)
      self.prefix.grid(row=3,column=1,pady=10)
      label = ttk.Label(self,text="Suffix:")
      label.grid(row=3,column=2,pady=10)
      self.suffix = ttk.Entry(self,width=5)
      self.suffix.grid(row=3,column=3,pady=10)
  
      var = False
      progressBar = ttk.Progressbar(self,orient="horizontal",length=300,mode="determinate")
      progressBar.grid(row=4,column=0,padx=10,pady=10,columnspan=2)
      check = ttk.Checkbutton(self,text="Run defaults",variable=var)
      check.v = var
      check.grid(row=4,column=2,padx=30,pady=10)
      button = ttk.Button(self,text="Run",width=20,command=self.run)
      button.grid(row=4,column=4,padx=10,pady=10,columnspan=2)
  def run(self):
      print("- - - RUN - - -")
      #print(controller.validate(self))
      print(self.validate)
      if(self.validate() == True):
          ##Script Code
      else:
          print("Validated - Not Acceptable")
  
      lambda: controller.show_frame(ProcessPage)
  </code></pre>
  
  <p>Cheers for any help!</p>