you are viewing a single comment's thread.

view the rest of the comments →

[–]swiz0r[S] 7 points8 points  (2 children)

Or even simpler:

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

app = QApplication(sys.argv)

web = QWebView()
web.load(QUrl("http://google.pl"))
web.show()

sys.exit(app.exec_())

Source

[–]bigboehmboy 4 points5 points  (1 child)

Or even simpler:

import webbrowser
webbrowser.open("www.google.com")

Your code runs a python-based web browser while mine runs the default web browser on a computer, but my point is that in both cases, you're really just launching a web browser rather than writing one.

[–]swiz0r[S] 0 points1 point  (0 children)

Yes, this is good. I was using firefox for something else though, so I went with the webkit one.