def __init__(self, dburl): if not dburl: return False self.mydb = DbHandler() self.mydb.createengine(url='sqlite:///:memory:')
self.ui.widget.canvas.ax1.plot( niveis_formacao[val - len(self.cursos) - 3].totalH) self.ui.widget.canvas.ax2.plot( niveis_formacao[val - len(self.cursos) - 3].totalM) self.ui.widget.canvas.ax3.plot( niveis_formacao[val - len(self.cursos) - 3].totalHM) self.ui.widget.canvas.ax1.legend('HMT') self.ui.widget.canvas.ax1.set_xticklabels( ('9596', '9798', '9900', '0102', '0304', '0506', '0708', '0910', '1112')) self.ui.widget.canvas.draw() if __name__ == "__main__": db = DbHandler("database/Inscritos.sqlite3") db.createTable("inscritos") db.writeToTable("Inscritos_2010-2011.xls") db.dbToCsv("curso", ["Computadores", "Informática"]) cursos = db.getInscritosCurso("curso", ["Computadores", "Informática"]) niveis_formacao = db.getInscritosNF() db.closeConnection() #Parte gráfica do programa app = QtGui.QApplication(sys.argv) myapp = GUIForm(cursos, niveis_formacao) myapp.show() sys.exit(app.exec_())