Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a simple cross-platform webbrowser with Python?

The http://code.google.com/p/pywebkitgtk/ looks great but it seems to be running on linux only.

Does anybody know if there is something similar but cross-platform?

If not what can be the alternatives to make with Python a simple web-browser that can run on Windows, MAC os and linux?

Thanks in advance

Update: Does anybody has some information about wxWebKit ?

like image 297
luc Avatar asked Jan 23 '23 08:01

luc


1 Answers

Qt (which has Python bindings with PyQt or PySide) offers Webkit (the same engine as Safari). Making a simple cross-platform browser is trivially implemented with this.

To show how easy this really is (example taken from the link):

#!/usr/bin/env python

import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *

app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("http://www.stackoverflow.com"))
web.show()

sys.exit(app.exec_())
like image 72
ChristopheD Avatar answered Jan 29 '23 10:01

ChristopheD