返回介绍

Introduction to PyGTK

发布于 2025-02-22 22:19:44 字数 3952 浏览 0 评论 0 收藏 0

In this part of the PyGTK programming tutorial, we will talk about the PyGTK GUI library and Python programming language in general.

About this tutorial

This is PyGTK programming tutorial. It has been created and tested on Linux. The PyGTK programming tutorial is suited for novice and more advanced programmers.

PyGTK

PyGTK is a set of Python wrappers for the GTK+ GUI library. It offers a comprehensive set of graphical elements and other useful programming facilities for creating desktop applications. It is a part of the GNOME project. PyGTK is free software and licensed under the LGPL. Original author or PyGTK is James Henstridge. PyGTK is very easy to use, it is ideal for rapid prototyping. Currently, PyGTK is one of the most popular bindings for the GTK+ library.

PyGTK consists of several modules.

PyGTK modules

GObject is a base class providing the common attributes and functions for PyGTK classes. ATK is the accessibility toolkit. This toolkit provides tools which help physically challenged people work with computers. GTK is the user interface module. The Pango is a library which is used to work with text and internationalisation. Cairo is a library for creating 2D vector graphics. Glade is used to build GUI interfaces from XML descriptions.

Python

python logo Python is a general-purpose, dynamic, object-oriented programming language. The design purpose of the Python language emphasises programmer productivity and code readability. Python was initially developed by Guido van Rossum. It was first released in 1991. Python was inspired by ABC, Haskell, Java, Lisp, Icon and Perl programming languages. Python is a high level, general purpose, multiplatform, interpreted language. Python is a minimalistic language. One of its most visible features is that it does not use semicolons nor brackets. Python uses indentation instead. There are two main branches of Python currently. Python 2.x and Python 3.x. Python 3.x breaks backward compatibility with previous releases of Python. It was created to correct some design flaws of the language and make the language more clean. The most recent version of Python 2.x is 2.7.1, and of Python 3.x 3.1.3. This tutorial is written in Python 2.x Today, Python is maintained by a large group of volunteers worldwide.

GTK+

The GTK+ is a library for creating graphical user interfaces. The library is created in C programming language. The GTK+ library is also called the GIMP Toolkit. Originally, the library was created while developing the GIMP image manipulation program. Since then, the GTK+ became one of the most popular toolkits under Linux and BSD Unix. Today, most of the GUI software in the open source world is created in Qt or in GTK+. The GTK+ is an object oriented application programming interface. The object oriented system is created with the Glib object system, which is a base for the GTK+ library. The GObject also enables to create language bindings for various other programming languages. Language bindings exist for C++, Python, Perl, Java, C#, and other programming languages.

Gnome and XFce desktop environments have been created using the GTK+ library. SWT and wxWidgets are well known programming frameworks, that use GTK+. Prominent software applications that use GTK+ include Firefox or Inkscape.

Sources

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文