Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package a python application with html/css/js frontend as a single executable

Tags:

python

webkit

I have a small application that has a html/css/js frontend (written by someone else) and a python backend that runs a small WSGI server via flask. Currently the python side is bundled up with py2exe and the frontend is distributed alongside.

However, it would be preferable if it would be possible to somehow call WebKit (or some other canvas/css3 supporting browser renderer) from python to start the html frontend without the usual browser chrome to give the impression that it is not a web app but a "real, native application"?

like image 590
Drakekin Avatar asked Apr 08 '26 10:04

Drakekin


1 Answers

As mentioned in the comments, QT has a qtwebkit module and there are several bindings for QT in python, the chief amongst them being PyQt4. However, PyQt4 is licensed either under the GPL or a paid-for propriatary license. All is not lost as Nokia have developed their own python bindings called PySide which can be used to embed webkit in a python application through the qtwebkit module.

like image 69
Drakekin Avatar answered Apr 10 '26 00:04

Drakekin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!