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

cross platformpythonwebkitwinapi

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 ?

Best Answer

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_())