Python GUI application embedding a web browser - Options?

Phil Thompson phil at riverbankcomputing.com
Wed Oct 19 07:10:00 EDT 2016


On 19 Oct 2016, at 11:07 am, Paul Moore <p.f.moore at gmail.com> wrote:
> 
> I'm looking to write a GUI application in Python (to run on Windows, using Python 3.5). The application is just a relatively thin wrapper around a browser - it's presenting an existing web application, just in its own window rather than in a standard browser window. I'm looking for advice on a good GUI toolkit to use.
> 
> I've not done much GUI programming in Python, so I don't have a "preferred toolkit" as such. A bit of Google searching found an embedded browser widget in PyQt, but the examples I tried didn't work - it looks like the QWebView class is deprecated and has been removed in the current version of PyQt. I haven't really found any other examples (there's a "embedding a web page in Tkinter" example I found, but it looks like it's just doing rendering, not embedding a full browser - which I need as the site I want to access uses CSS/JavaScript).
> 
> Is there any good option for this, or would I be better looking elsewhere for a solution? I could probably work out how to knock something up using .NET, or a HTA file, for example, I'm just more comfortable coding in Python.

The Chrome-based QWebEngineView (http://doc.qt.io/qt-5/qwebengineview.html) is fully supported by PyQt.

Phil


More information about the Python-list mailing list