Skip to main content

7 Top Python GUI Frameworks for 2017


As a Python developer, sooner or later you’ll want to write an application with a graphical user interface. Fortunately, there are a lot of Python GUI options: The Python wiki on GUI programming lists over 30 cross-platform frameworks, as well as Pyjamas, a tool for cross-browser Web development based on a port of the Google Web Toolkit.

How to choose between all these options for Python GUI? I started by narrowing it down to those that included all three platforms (Windows, Mac, and Linux) and, where possible, Python 3. After that filtering, I found four toolkits (Gtk, Qt, Tk, and wxWidgets) and seven frameworks (Kivy, PyQt, gui2Py, libavg, wxPython, Pyforms, and PyGOBjects). Here’s why I like them.

Kivy
One of the more interesting projects, the liberal MIT-licensed Kivy is based on OpenGL ES 2 and includes native multi-touch for each platform and Android/iOS. It’s an event-driven framework based around a main loop, and is thus very suitable for game development. Your application adds callbacks from the main loop at a scheduled frequency, or by one-off trigger. The Kivy framework is very powerful for handling everything from widgets to animation, and includes its own language for describing user interface and interactions.

If you want to create cross-platform graphical applications, or just need a very powerful cross-platform GUI, Kivy is highly recommended.

Pyforms
At just two years old (making it one of the more recent frameworks), Pyforms is a Python 2.7/3.x cross-environment framework for developing GUI applications. It is modular and encourages code reusability with minimal effort.

Based on PyQt, OpenGL and other libraries, it provides a quite comprehensive set of 22 controls, all based on a ControlBase object; it also includes a video player, web browser and OpenGL. Read the Pyforms online docs to get a feel for it.

PyGObject (a.k.a. PyGi)
PyGObject is a module that lets you write Python applications for the GNOME project or a Python application using GTK+. It provides bindings to GObject, a C cross-platform library that offers common types and a baseclass to a large code base and has been used in many projects since 2002; for example, in the GIMP image manipulator, for which GTK+ was developed.

GTK+ is a comprehensive free software cross-platform widget toolkit that offers GUI capability in many Linux and Windows/Mac OSX applications.

PyQt
Qt is a multi-licensed cross-platform framework written in C++. If your application is completely open source, you can use Qt for free under the community license; otherwise you’ll need a commercial license. Qt has been around for a long time and was owned by Nokia for a while; it’s a very comprehensive library of tools and APIs, widely used in many industries, and covers many platforms including mobile. If a gadget such as a SatNav has a GUI, there’s a good chance it’ll be Qt based.

PyGUI
Compared to Kivy and PyQt, PyGUI is considerably simpler and just for Unix, Macintosh and Windows platforms. Developed by Dr. Greg Ewing at the University of Canterbury in New Zealand, the MVC framework focuses on fitting into the Python ecosystem as easily as possible.

One of the platform’s aims is to interpose as little code as possible between the Python application and the platform’s underlying GUI so the application’s display always reflects the native GUI of the platform. If you’re after a simple and quick way to learn GUI, start with this one.

libavg
This is another third-party library, written in C++ and scripted from Python, with properties of display elements as Python variables, a full-featured event handling system, timers (setTimeout, setInterval), support for logging and more. Like Kivy, libavg uses OpenGL and makes use of hardware acceleration.

Libavg runs on Linux, Mac OS X and Windows, and is open source and licensed under the LGPL. It’s been used extensively for artistic exhibitions and has a wide range of features such as a layout engine that can deal with thousands of objects (images, text, videos and camera output), fast video output, and a markup system for displaying text, as well as GPU shader effects such as blur, Chromakery and more. Plugins written in C++ have access to all libavg internals.

If you ever see many people playing a multi-touch game on a large flat display, you might be looking at a good example of libavg in action.

wxPython
There have already been two books written about wxPython, making it worth a mention even if it isn’t quite ready for Python 3. WxPython is based on wxWidgets, a cross-platform GUI library written in C++. In addition to the standard dialogs, it includes a 2D path drawing API, dockable windows, support for many file formats and both text-editing and word-processing widgets.

There’s a great set of demos provided with wxPython, along with several sets of tutorials to help get you started. Given that wxWidgets has a 22-year development pedigree, this is one of the most popular frameworks. Make sure you read the wiki.

Conclusion
This is a great set of frameworks that should cover most needs. All except PyQt are completely free.

Source : uk.dice.com

Comments

  1. Very nice blog post on Python tools, I must appreciate you for taking the time to put this together. Great stuff. Find interesting Python blogs below
    Python Training in Chennai
    Python Course in Chennai

    ReplyDelete
  2. Wow its great. I can see how much effort to write this blog which was so informative for me. Thanks for sharing. Python Classes in Pune

    ReplyDelete
  3. It's rare all around educated individuals in this specific point, yet you sound like you hear what you're saying! Much obliged
    earthcycle

    ReplyDelete

Post a Comment

Popular posts from this blog

Top 10 Programming Languages to Learn in 2017

We are almost halfway through 2017, and it’s always exciting for web developers to know which programming languages have been the best picks lately in the programming world. In this blog, I am unveiling 10 most preferred languages in 2017 so far. Please note that the top 10 languages I am going to list below are strictly based on GitHub’s recent data and TIOBE Index for June 2017 - the most credible sources to track the popularity of programming languages. Let’s Begin!!! Java Java , an open-source language that’s been around since the 1990’s, allows developers to “write once, run anywhere”. So, you can run compiled Java code on all platforms without having to recompile. Java is the product of Oracle corporation and is widely used for creating server-side applications, video games, mobile applications and smart TV applications. Since both large and small businesses use applications written in Java, this language is high in demand and ranked among the top ones by Tiobe In...

Why Net Neutrality is so important?

Net Neutrality is the basic principle that prohibits internet service providers like AT&T, Comcast and Verizon from speeding up, slowing down or blocking any content, applications or websites you want to use. Net Neutrality is the way that the internet has always worked. In 2015, millions of activists pressured the Federal Communications Commission to adopt historic Net Neutrality rules that keep the internet free and open — allowing people to share and access information of their choosing without interference. But right now the internet is in peril. On Dec. 14, 2017, the FCC’s Republican majority approved Chairman Ajit Pai’s plan to gut the Net Neutrality protections. A former Verizon lawyer and a Trump appointee, Pai ignored the widespread outcry against his plan from millions of people, lawmakers, companies andco public-interest groups. We can’t let Pai have the last word on this — which is why we’re calling on Congress to use a “resolution of disapproval” to overtur...

Facebook to use surveys to boost ‘trustworthy’ news

Facebook has announced it will prioritise news sources deemed to be more trustworthy on its News Feed. The firm said  the social network community would determine which outlets are reliable via the use of user surveys. Founder and chief executive Mark Zuckerberg said news content would soon make up around 4% of what appeared in people's News Feeds - down from 5% before. The move is the latest attempt by the company to quell the spread of so-called fake news and propaganda on the network. Mark Zuckerberg vows to 'fix' Facebook As part of that continuing battle,  Twitter also announced on Friday  that it had notified 677,775 US-based users who had retweeted, liked or followed Russian bot accounts on the network in the run up to the 2016 US presidential election. The change is an attempt to shift the key judgements over bias and accuracy away from Facebook's employees, and onto its user base. "We could try to make that decision ourselves, but that...