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

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

Why you should learn Coding / Programming

Steve Jobs once said : “I think everybody in this country should learn how to program a computer because it teaches you how to think”. 1. There are great Job Opportunities Coders, programmers and software engineers are in high demand, with more computing jobs available than IT professionals to fill them. If you want to make a career change, then programming is a very safe bet. And learning at least one programming language is the first step down a potentially very lucrative career path. 2. Even if you’re not a programmer/Software Engineer It’s not just IT professionals who can benefit from learning a programming language. Knowing code can help anyone from content creators to office managers, and even basic programming skills can give you the edge in an increasingly competitive job market. Whatever your role in a company, there’s a good chance you’ll have to work with programmers at some point. Having an understanding of programming languages will help you work together

What is Cloud Computing?

Cloud computing is an information technology (IT) paradigm that enables ubiquitous access to shared pools of configurable system resources and higher-level services that can be rapidly provisioned with minimal management effort, often over the Internet. Cloud computing relies on sharing of resources to achieve coherence and economy of scale, similar to a utility. Cloud computing enables companies to consume a compute resource, such as a virtual machine (VM), storage or an application, as a utility -- just like electricity -- rather than having to build and maintain computing infrastructures in house. Third-party clouds enable organizations to focus on their core businesses instead of expending resources on computer infrastructure and maintenance. Advocates note that cloud computing allows companies to avoid or minimize up-front IT infrastructure costs. Proponents also claim that cloud computing allows enterprises to get their applications up and running faster, with improved ma