• 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

    • Nice I guess. Azure's DaaS feature has supported that for years. It's so odd to me how MS is deploying Azure and 365 DaaS as two totally different services with different features. I would think the 365 cloud desktops would just be a slightly dumbed down frontend that manages the same service.
    • Oh and gaming on a PC cost way more. To get PS5 Pro performance on a PC it will cost you more, especially with the crazy GPU costs today. While you can play Last of US and Horizon, finally, you cant play GT7 unless you have a PS5 (other games as well).
    • IT admins will soon be able to provision cloud apps rather than entire Windows 365 Cloud PCs by Usama Jawad As we discussed earlier, Windows 365 Cloud PC is a neat way to access virtualized operating systems without getting access to physical hardware. It makes it much easier to work in hybrid or remote environments using hardware and software managed on the cloud by your organization. However, Microsoft is making this process even more convenient with a private preview for Windows 365 Cloud Apps. In its announcement, Microsoft has revealed that it is testing a way to deliver individual apps to users securely via Windows 365, instead of having an entire Cloud PC provisioned for them. It is important to note that these apps will still be hosted on the Cloud PC, a user just won't need access to a dedicated Cloud PC. Microsoft believes that this improved way of app delivery will facilitate seasonal and remote workers by getting them access to just the line-of-business (LOB) apps that they require, while also offering centralized and simplified management capabilities. Importantly, Redmond believes that this will facilitate migration from on-prem virtual desktop infrastructure (VDI) to the cloud too. Deploying this new experience is fairly straightforward for any IT admin who has prior experience with setting up Windows 365. They will need to select an "app-only" experience during the configuration process instead of the full desktop mode and then control the licenses and app access. During this private preview period, only apps available in the Start menu of the gallery or custom images are supported, but more types of apps will be supported for streaming as we get closer to general availability (GA). On the end-user side, customers with Cloud Apps provisioned for them will be able to launch them from the Windows App gateway. Any security policy that applies to the associated Cloud PC will also apply to the Cloud App in use. Microsoft has encouraged those interested in joining the private preview to contact their Microsoft account team or fill in this form. There is no word yet regarding general availability.
    • Tell me one Anti-Cheat that actually stops cheating on any Windows game? Yes that worthless Windows PC game anti-cheat can break some games on Linux, but like you said there is some games that have it and they don't break on Linux. Developers just need to get rid of anti-cheat on PC games as it is does nothing.
    • "Sony, with its Playstation 5, has the worst operating system for games, very complicated and unstable." Lol and it has sold 75 million devices, on track to outsell the PS4 at 130million. All the games on it seem to run just fine. Developers have often stated the tools for game development on the PS are better than Xbox. Microsoft can port their games to it fast enough.
  • Recent Achievements

    • Week One Done
      slackerzz earned a badge
      Week One Done
    • Week One Done
      vivetool earned a badge
      Week One Done
    • Reacting Well
      pnajbar earned a badge
      Reacting Well
    • Week One Done
      TBithoney earned a badge
      Week One Done
    • First Post
      xuxlix earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      668
    2. 2
      ATLien_0
      284
    3. 3
      Michael Scrip
      223
    4. 4
      +FloatingFatMan
      196
    5. 5
      Steven P.
      138
  • Tell a friend

    Love Neowin? Tell a friend!