wxPython GUI update with data from a MySQL database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alina Ghergu

    #1

    wxPython GUI update with data from a MySQL database

    Hi there,

    I'm currently developing a GUI for a network monitor. I have to plot
    data taken from a MySQL database. For GUI I use wxPython, for plotting
    Matplotlib. The plotting has to be realtime, so
    I have to query the database periodically. I don't have enough
    experience in programming and I would need some advice about the best
    approach in this matter.

    I tried to solve it using wx.Timer but from time to time MySQL server
    doesn't repond to queries. I use one db connection for all my queries.
    I also tried a threads approach but because I don't know how to use
    them the result was worse.

    Any sugestion will be highly apreciated.

    Alina

  • Krzysztof Stachlewski

    #2
    Re: wxPython GUI update with data from a MySQL database

    "Alina Ghergu" <alina.ghergu@g mail.comwrote in message
    news:1155807053 .375687.15930@i 3g2000cwc.googl egroups.com...

    Hi,
    I have to query the database periodically. I don't have enough
    experience in programming and I would need some advice about the best
    approach in this matter.
    >
    I tried to solve it using wx.Timer but from time to time MySQL server
    doesn't repond to queries. I use one db connection for all my queries.
    What is the error returned from MySQL when it is not responding to queries?

    Stach


    Comment

    • Alina Ghergu

      #3
      Re: wxPython GUI update with data from a MySQL database


      Krzysztof Stachlewski wrote:
      "Alina Ghergu" <alina.ghergu@g mail.comwrote in message
      news:1155807053 .375687.15930@i 3g2000cwc.googl egroups.com...
      >
      Hi,
      >
      I have to query the database periodically. I don't have enough
      experience in programming and I would need some advice about the best
      approach in this matter.

      I tried to solve it using wx.Timer but from time to time MySQL server
      doesn't repond to queries. I use one db connection for all my queries.
      >
      What is the error returned from MySQL when it is not responding to queries?
      >
      Stach
      Hi Stach,

      The error is "Lost connection to MySQL server during query".

      Alina

      Comment

      • Alina Ghergu

        #4
        Re: wxPython GUI update with data from a MySQL database


        I solved the problem by using a more recent version of MySQLdb,
        compatible with MySQL 5.0.

        Comment

        Working...