简体   繁体   中英

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 ?

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

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

如果您不介意在开源项目中修改代码,可以尝试在现代版本的Python中运行Grail

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM