mysql query result

Hi, Paolo

  I have been doing what you are talking about I think.
Right now I just send the command-line call to the program that
access's the mysql DB and prints to stdout. Was trying to use
the program with both command-line and gui. Think I am going
to change it to just gui soon though.

Below is the relevent parts that I use to access my main program that
prints the results from the mysql query to stdout. With the gui code below
I just send the command with 'os.popen' . Then use a while loop to read it
and WriteText to print it to the multiline wxTextCtrl.

class MyApp(wxApp):
  """Controls for the Frame (Parent) of the Gui"""
  def OnInit(self)
    ......
    EVT_BUTTON(self,ID_TDisp_button,self.onShowTable)
    ......

  def onShowTable(self,event):
    result = os.popen("python /home/david/main.py --showinfo")
    self.frame.ResultsDisp.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD, FALSE, "Courier"))
    while 1:
      line = result.read()
      if line == "":
        break
          self.frame.ResultsDisp.WriteText(line)

Hope this helps.
Dave