How to do it...

First, we will display the data to be modified by running the following Python to MySQL command:

import MySQLdb as mysql import Ch07_Code.GuiDBConfig as guiConf class MySQL():     # class variable     GUIDB  = 'GuiDB'     #------------------------------------------------------     def showData(self):         # connect to MySQL         conn, cursor = self.connect()            self.useGuiDB(cursor)               # execute command         cursor.execute("SELECT * FROM books")         print(cursor.fetchall())         cursor.execute("SELECT * FROM quotations")         print(cursor.fetchall())         # close cursor and connection         self.close(cursor, conn) #========================================================== if __name__ == '__main__':      # Create class instance     mySQL = MySQL()     mySQL.showData()

Running the ...

Get Python GUI Programming Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.