开发者

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 li开发者_开发技巧nux?

Thanks in advance

Update: Does anybody has some information about wxWebKit ?


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


If you don't mind modifying code in an open-source project, you can attempt making Grail run in a modern version of Python.


Coming back to this question asked 3 years ago, I would like to mention Chromium Embdedded Framework. It worths a try.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜