• 0

How do you Embed Webkit in a Python GUI/WxPython (cross platform) and Qt5/PySide License Conflicts


Question

Hi,

I am the lead developer for the project PHP Nightrain. Currently, it is coded in Python and using WxPython to create the GUI, etc? For the most part it does what it was designed to do.

But it is not quite where I would like it to be. Currently, it is using the WebView control from WxPython. So, on Windows the software uses IE, on OS X it uses Safari and on Linux it needs the libwebkit-dev to work. The WebKitCtrl is only for OS X :(

I want to accomplish the following:

1. Remove WxWebview or make it optional.
2. Embed WebKit in my Python application. So, on Windows, Linux and Mac it will use webkit by default.
3. Everything has to be packaged in a single executable. I don?t want my users to manually install libwebkit-dev, etc? Not really sure how to accomplish that with pyinstaller.

Can you give me a top level idea on what I will need to do to make it possible? I guess the main question I am asking is?. how do I take webkit source and bind it in my Python application? I am assuming I will have to learn C/C++? but I?m not sure where to go after learning C/C++?

Qt5 bindings for Python was excellent. But their confusing licensing terms is making me skeptical to use their solution.

PHP Nightrain is licensed under MIT and PySide is licensed under LGPL but the actual Qt5 libraries are licensed under GPL, LGPL and Commercial. Can my project use PySide without any restriction? I want my users to download PHP Nightrain binaries and use it for whatever they want (open source, commercial, whatever). So, I am not sure whether PySide LGPL license and Qt5 Licenses will make an issue out of it :/?

5 answers to this question

Recommended Posts

  • 0

https://code.google.com/p/cefpython/

 

Author of PHP Desktop made a project for embedding chromium into a python project ;)

 

This project supports embedding in PyGTK, PyQt and PySide.

  • 0

As far as I've come to understand you're free to distribute PySide apps so long as they stay open source. I also found it very confusing. With that in mind packaging it into a single executable may break that license. I've yet to see a reliable method of packaging Python 3 into a single file. Python 2 can do it though I hear.

  • 0
  On 25/09/2014 at 13:45, simplezz said:

I don't know if this is what you're looking for, but there's Python bindings for GTK's Webkit port. GTK works across most platforms.

 

i did use this on my linux distros but there's no precompiled "WebKitGtk" on the Windows platform. And WebKitGtk does not provide any instructions for compiling it to Windows either. It's something along the line where you have to compile Webkit on windows first and then the WebKitGtk bindings... and then you can use PyWebkitGTK. There is a .NET Webkit control though... so, I might have to do something with IronPython -_-

  • 0
  On 25/09/2014 at 19:12, roosevelt said:

i did use this on my linux distros but there's no precompiled "WebKitGtk" on the Windows platform. And WebKitGtk does not provide any instructions for compiling it to Windows either. It's something along the line where you have to compile Webkit on windows first and then the WebKitGtk bindings... and then you can use PyWebkitGTK. There is a .NET Webkit control though... so, I might have to do something with IronPython -_-

It's possible to build the source for Windows (cross compilation or Mingw/Cygwin), but you'd need Mingw and associated tools. Failing that, there are some precompiled binaries around. I can't attest to how well they work or how up to date they are, but it's an option. Ideally, you'd want to build it yourself to get the latest and greatest, as well as compiler optimisations (-march=) suitable for the target machine(s). I understand that not everyone is versed in those disciplines though.

This topic is now closed to further replies.
  • Posts

    • RoboForm 9.7.5 by Razvan Serea RoboForm is the top-rated Password Manager and Web Form Filler that completely automates password entering and form filling. RoboForm makes logging into Web sites and filling forms faster, easier, and more secure. RoboForm memorizes and securely stores each user name and password the first time you log into a site, then automatically supplies them when you return. RoboForm's powerful Logins feature eliminates the manual steps of logging into any online account. With just one click RoboForm will navigate to a Web site, enter your username and password and click the submit button for you. Completing long registration or checkout forms is also a breeze. Simply click on your RoboForm Identity and RoboForm fills-in the entire form for you. You no longer need to remember all your passwords. You remember one Master Password, and RoboForm remembers the rest. This allows you to use stronger passwords, making your online experience more secure. RoboForm uses strong AES encryption for complete data security. The all new RoboForm comes with Chrome and Safari browser support, iPhone/iPad and Android support, as well a brand new RoboForm Everywhere license for use on unlimited computers and mobile devices. RoboForm 9.7.5 changelog: Prepared for the upcoming RoboForm browser extension with New Auth. Download: RoboForm 9.7.5 | 42.1 MB (Free, paid upgrade available) View: RoboForm Website Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • NTLite 2025.06.10460 is out.
    • I understand. I am not talking about benchmarks at all, even though I probably should look into those too - I just mean historically Vivaldi was a rather sluggish chromium browser when in use compared to other chromium browsers. I am always willing to give it additional tries whenever performance improvements are mentioned in the patch notes.
    • First make whole system slow and now making it fast. That's your own doing-undoing !!
  • Recent Achievements

    • One Year In
      Vladimir Migunov earned a badge
      One Year In
    • One Month Later
      daelos earned a badge
      One Month Later
    • Week One Done
      daelos earned a badge
      Week One Done
    • Mentor
      Karlston went up a rank
      Mentor
    • One Month Later
      EdwardFranciscoVilla earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      493
    2. 2
      snowy owl
      252
    3. 3
      +FloatingFatMan
      250
    4. 4
      ATLien_0
      225
    5. 5
      +Edouard
      180
  • Tell a friend

    Love Neowin? Tell a friend!