I'm new to Python. For learning purposes, I want to create desktop application by using QtWebKit and Flask. You can find the source code hereMain idea is: create a form including a QWebview widgetcreate a Flask app    run Flask app on QWebviewIt works correctly but I want to know:How can I improve my code?is this good way to create desktop apps?My code is: main.pyfrom core.Core import *app = Flask(__name__)from routes import * if __name__ == '__main__':    main(app)core module: core/Core.pyimport sysfrom flask import Flask , render_templatefrom PyQt4.QtCore import *from PyQt4.QtGui import *from PyQt4.QtWebKit import *from threading import Threadclass FlaskThread(QThread):    def __init__(self,app):        QThread.__init__(self)        self.app = app    def __del__(self):        self.wait()    def run(self):        self.app.run()def main(app):    th = FlaskThread(app)    th.start()    #qt init    qtapp = QApplication(sys.argv)    qtapp.aboutToQuit.connect(lambda : th.terminate())    webview = QWebView()    webview.load(QUrl('http://localhost:5000'))    webview.show()    sys.exit(qtapp.exec_())and then routes.pyfrom main import *@app.route('/')def index():          #return 'hi'     return render_template('index.html')
Python GUI by QtWebkit and Flask
python;flask;pyqt