app.py 673 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import webview
  4. from flask import Flask, render_template
  5. server = Flask(__name__, template_folder='./templates', static_folder='./static')
  6. @server.route("/")
  7. def index():
  8. return render_template("index.html")
  9. if __name__ == '__main__':
  10. chinese = {
  11. 'global.quitConfirmation': u'确定关闭?',
  12. }
  13. window = webview.create_window(
  14. title='IOmga',
  15. url=server,
  16. width=1080,
  17. height=840,
  18. # frameless=True,
  19. # easy_drag=True,
  20. # hidden=True,
  21. transparent=True,
  22. )
  23. webview.start(gui="cef", localization=chinese, debug=True, http_server=True)