PyGObject
   HOME

TheInfoList



OR:

PyGTK is a set of
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
wrappers for the
GTK GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
. PyGTK is
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
and licensed under the
LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
. It is analogous to
PyQt PyQt is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt is free software developed by the British firm Riverbank Computing. It is available under similar terms to Qt versions older than 4.5; this mea ...
/
PySide PySide is a Python binding of the cross-platform GUI toolkit Qt developed by The Qt Company, as part of the Qt for Python project. It is one of the alternatives to the standard library package Tkinter. Like Qt, PySide is free software. PySide sup ...
and
wxPython wxPython is a wrapper for the cross-platform GUI API (often referred to as a "toolkit") wxWidgets (which is written in C++) for the Python programming language. It is one of the alternatives to Tkinter. It is implemented as a Python extension mod ...
, the Python wrappers for Qt and
wxWidgets wxWidgets (formerly wxWindows) is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with mini ...
, respectively. Its original author is
GNOME A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
developer James Henstridge. There are six people in the core development team, with various other people who have submitted patches and bug reports. PyGTK has been selected as the environment of choice for applications running on One Laptop Per Child systems. PyGTK will be phased out with the transition to GTK version 3 and be replaced with PyGObject, which uses
GObject Introspection The GLib Object System, or GObject, is a free software, free software library providing a portable object system and transparent cross-language interoperability. GObject is designed for use both directly in C (programming language), C programs t ...
to generate bindings for Python and other languages on the fly. This is expected to eliminate the delay between GTK updates and corresponding
language binding In programming and software design, binding is an application programming interface (API) that provides glue code specifically made to allow a programming language to use a foreign library or operating system service (one that is not native to th ...
updates, as well as reduce maintenance burden on the developers.


Syntax

The Python code below will produce a 200x200 pixel window with the words "
Hello World ''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses ''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the ''Norwich C ...
" inside. import gtk def create_window(): window = gtk.Window() window.set_default_size(200, 200) window.connect("destroy", gtk.main_quit) label = gtk.Label("Hello World") window.add(label) label.show() window.show() create_window() gtk.main()


Notable applications that have used PyGTK

PyGTK has been used in a number of notable applications, some examples: * Anaconda installer * BitTorrent *
Deluge A deluge is a large downpour of rain, often a flood. The Deluge refers to the flood narrative in the Biblical book of Genesis. Deluge may also refer to: History *Deluge (history), the Swedish and Russian invasion of the Polish-Lithuanian Comm ...
* Emesene *
Exaile Exaile is a cross-platform free and open-source audio player, tag editor and library organizer. It was originally conceived to be similar in style and functions to KDE's Amarok 1.4, but uses the GTK widget toolkit rather than Qt. It is writte ...
* Flumotion *
Gajim Gajim is an instant messaging client (computing), client for the Extensible Messaging and Presence Protocol, XMPP protocol which uses the GTK toolkit. The name Gajim is a recursive acronym for ''Gajim's a jabber instant messenger''. Gajim runs o ...
*
gDesklets gDesklets is a GNOME program which provides the architecture for small applets (desktop widgets) to be placed on top of the user's desktop. It is comparable to other desktop widget programs. The applets placed on the desktop are meant to be qui ...
*
Gedit gedit ( or ) is a text editor designed for the GNOME desktop environment. It was GNOME's default text editor and part of the GNOME Core Applications until GNOME version 42 in March 2022, which changed the default text editor to GNOME Text E ...
(for optional Python subsystem and plugins) *
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized task ...
(for optional Python scripts) * GNOME Sudoku *
Gramps Gramps (formerly GRAMPS, an acronym for Genealogical Research and Analysis Management Programming System) is a free and open source genealogy software. Gramps is programmed in Python using PyGObject. It uses Graphviz to create relationship grap ...
* Gwibber (microblogging client) *
Jokosher Jokosher is a free software, non-linear multi-track digital audio editor, released under the GPL-2.0-only. It is written in Python, using the GTK+ interface and GStreamer as an audio back-end, initially just for the Linux operating system b ...
*
puddletag Puddletag is a graphical audio file metadata editor ("tagger") for Unix-like operating systems. It is free and open-source software subject to the terms of the GNU General Public License (GPL) version 3. In most major desktop Linux distributions, ...
*
PyMusique SharpMusique was a rewrite in C# of PyMusique (written in Python), both programs were iTunes Music Store clients, allowing songs to be downloaded from the iTunes Music Store without DRM. PyMusique PyMusique was written by Travis Watkins, Cody B ...
*
Pybliographer Pybliographer is a reference management software tool that deals with bibliographic databases, used for viewing, editing, searching, and reformatting bibliographies. Written in Python and licensed under GNU GPL, it provides a scripting framework o ...
*
Tryton ''Tryton'' is a three-tier high-level general purpose computer application platform on top of which is built an Enterprise resource planning (ERP) business solution through a set of Tryton modules. The three-tier architecture consists of the Tr ...
*
ROX Desktop The ROX Desktop is a graphical desktop environment for the X Window System. It is based on the ROX-Filer which is a drag and drop spatial file manager. It is free software released under the GNU General Public License. The environment was ins ...
(includes ROX-Filer) * SoundConverter *
Ubiquity Ubiquity is a synonym for omnipresence, the property of being present everywhere. Ubiquity may also refer to: * Ubiquity (software), a simple graphical installer made for the Ubuntu operating system * Ubiquity (Firefox), an experimental extensi ...
(
Ubuntu Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: ''Desktop'', ''Server'', and ''Core'' for Internet of things devices and robots. All the ...
installer) *
Ubuntu Software Center Ubuntu Software Center, or simply Software Center, is a discontinued high-level graphical front end for the APT/dpkg package management system. It is free software written in Python, PyGTK/PyGObject based on GTK. The program was created for a ...
*
Wing IDE The Wing Python IDE family of integrated development environments (IDEs) from Wingware was created specifically for the Python (programming language), Python programming language, with support for editing, testing, debugging, inspecting/browsin ...
* Comix


PyGObject

PyGObject provides a wrapper for use in Python programs when accessing GObject libraries.
GObject The GLib Object System, or GObject, is a free software library providing a portable object system and transparent cross-language interoperability. GObject is designed for use both directly in C programs to provide object-oriented C-based APIs ...
is an object system used by
GTK GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
,
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever sinc ...
,
GObject The GLib Object System, or GObject, is a free software library providing a portable object system and transparent cross-language interoperability. GObject is designed for use both directly in C programs to provide object-oriented C-based APIs ...
,
GIO Gio or GIO may refer to: People * Gio (nickname) * Gio (footballer, born 1984), Spanish * Gio (singer) (born 1990) * Gio people, an ethnic group in northeastern Liberia and Côte d'Ivoire Science and technology * Gi/o, protein subunits * GIO, ...
,
GStreamer GStreamer is a pipeline-based multimedia framework that links together a wide variety of media processing systems to complete complex workflows. For instance, GStreamer can be used to build a system that reads files in one format, processes them, ...
and other libraries. Like the GObject library itself, PyGObject is licensed under the
GNU LGPL The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
, so it is suitable for use in both free software and proprietary applications. It is already in use in many applications ranging from small single-purpose scripts to large full-featured applications. PyGObject can dynamically access any GObject libraries that use
GObject Introspection The GLib Object System, or GObject, is a free software, free software library providing a portable object system and transparent cross-language interoperability. GObject is designed for use both directly in C (programming language), C programs t ...
. It replaces the need for separate modules such as PyGTK, GIO and python-gnome to build a full GNOME 3.0 application. Once new functionality is added to GObject library it is instantly available as a Python API without the need for intermediate Python glue.


Notable applications that use PyGObject

PyGObject has replaced PyGTK, but it has taken a considerable amount of time for many programs to be ported. Most of the software listed here has an older version which used PyGTK. *
Ex Falso In classical logic, intuitionistic logic and similar logical systems, the principle of explosion (, 'from falsehood, anything ollows; or ), or the principle of Pseudo-Scotus, is the law according to which any statement can be proven from a co ...
*
Gramps Gramps (formerly GRAMPS, an acronym for Genealogical Research and Analysis Management Programming System) is a free and open source genealogy software. Gramps is programmed in Python using PyGObject. It uses Graphviz to create relationship grap ...
*
Meld MELD may refer to: * Model for End-Stage Liver Disease, a prognostic model * A variant of the declarative language CycL * Molecular orbital diagram, Molecular energy-level diagram, a type of one-dimensional plot with a significant qualitative aspec ...
*
Pitivi Pitivi (originally spelled PiTiVi) is a free and open-source non-linear video editor for Linux, developed by various contributors from free software community and the GNOME project, with support also available from Collabora. Pitivi is designed t ...
*
PyChess ''PyChess'' is a free software chess client developed for GNU. It allows users to play offline or online via the Free Internet Chess Server (FICS). PyChess also incorporates a built-in chess engine, which in contrast to most other chess AIs is wr ...
*
Quod Libet A quodlibet (; Latin for "whatever you wish" from ''quod'', "what" and '' libet'', "pleases") is a musical composition that combines several different melodies—usually popular tunes—in counterpoint, and often in a light-hearted, humorous manne ...


See also

*
PyQt PyQt is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt is free software developed by the British firm Riverbank Computing. It is available under similar terms to Qt versions older than 4.5; this mea ...
(Python wrapper for the Qt toolkit) *
PySide PySide is a Python binding of the cross-platform GUI toolkit Qt developed by The Qt Company, as part of the Qt for Python project. It is one of the alternatives to the standard library package Tkinter. Like Qt, PySide is free software. PySide sup ...
(Alternative Python wrapper for the Qt toolkit) *
wxPython wxPython is a wrapper for the cross-platform GUI API (often referred to as a "toolkit") wxWidgets (which is written in C++) for the Python programming language. It is one of the alternatives to Tkinter. It is implemented as a Python extension mod ...
(Python wrapper for the wx widgets collection)


References


External links


PyGTK Homepage

PyGTK FAQ



PyGTK Notebook A Journey Through Python Gnome Technologies by Peter Gill

PyGTK at Python wiki

PyGObject Homepage


{{Widget toolkits GTK language bindings Python (programming language) libraries Software that uses PyGObject Software that uses PyGTK Widget toolkits