title: wxPython: Getting values from Dialog, and using it outside the Dialog class
body: <p>I have this simple Dialog:</p>
  
  <pre><code>import wx  
  import wx.lib.sized_controls as sc  
  import time  
  import datetime  
  class Dialog(sc.SizedDialog):  
      def __init__(self, parent, id):  
          sc.SizedDialog.__init__(self, None, -1, "AuTel", style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)            
          pane = self.GetContentsPane()  
          pane.SetSizerType("form")  
  
          wx.StaticText(pane, -1, "N1:")
          N1_BOX = wx.SpinCtrl(pane, -1, "", (40,40), (60,-1))
          N1_BOX.SetRange(1,1000)
          N1_BOX.SetValue(2)
  
          wx.StaticText(pane, -1, "N2:")
          N2_BOX = wx.SpinCtrl(pane, -1, "", (40,40), (60,-1))
          N2_BOX.SetRange(1,1000)
          N2_BOX.SetValue(10)
  
          wx.StaticText(pane, -1, "T1:")
          T1_BOX = wx.SpinCtrl(pane, -1, "", (40,40), (60,-1))
          T1_BOX.SetRange(1,60)
          T1_BOX.SetValue(4)
  
          wx.StaticText(pane, -1, "T2:")
          T2_BOX = wx.SpinCtrl(pane, -1, "", (40,40), (60,-1))
          T2_BOX.SetRange(1,60)
          T2_BOX.SetValue(5)
  
          RUN_BUTTON = self.SetButtonSizer(self.CreateStdDialogButtonSizer(wx.OK | wx.CANCEL))
  
          self.Fit()
          self.SetMinSize(self.GetSize())
  
  app = wx.PySimpleApp()
  dlg = Dialog(None, -1)
  dlgrslt = dlg.ShowModal()
  
  if dlgrslt != wx.ID_OK:
  print ('Exiting..')
  exit
  else:
      pass
      print (N1+N2/T1-T2)
  
  dlg.Destroy()
  app.MainLoop()
  </code></pre>
  
  <p>I need when I click OK, Values of N1_BOX, N2_BOX, T1_BOX, and T2_BOX to be taken, then I can use them later in the script for other purpose. What shall I do in my script in order to achieve this ? Also, how can I make another Window to display the result of N1+N2/T1-T2 ? I need this window to be attached with the dialog window, but i don't know how can I do it.
  Sorry for my basic questions, but I am new to programing world.</p>
  
  <p>Regards,
  Amr</p>