Skip to main content

A Python native, OS native GUI toolkit.

Project description

A Python native, OS native GUI toolkit.

Quickstart

To get a demonstration of the capabilities of Toga, run the following:

$ pip install toga-demo
$ toga-demo

This will pop up a GUI window with some sample widgets.

Prerequisites

Toga has some minimum requirements:

  • If you’re on macOS, you need to be on 10.7 (Lion) or newer.

  • If you’re on Linux, you need to have GTK+ 3.4 or later. This is the version that ships starting with Ubuntu 12.04 and Fedora 17.

  • If you want to use the WebView widget, you’ll also need to have WebKit, plus the GI bindings to WebKit installed.

    • For Ubuntu that’s provided by the (libwebkitgtk-3.0-0) and (gir1.2-webkit-3.0) packages.

    • For Fedora it’s all provided in the (webkitgtk3) package.

If these requirements aren’t met, Toga either won’t work at all, or won’t have full functionality.

Problems with source installs

Internally, Toga is comprised of a number of subpackages - one for each platform it supports. If you install using wheels, the install process will correctly identify the required packages and install them. However, if you install from source using pip, there is a known bug in pip that causes dependencies to not be installed. It may be necessary to manually install the following pre-requisites:

  • OS X: pip install toga-cocoa colosseum rubicon-objc

  • Linux: pip install toga-gtk colosseum

  • Win32: pip install toga-win32 colosseum

Problems using virtualenv under Linux

When running under Linux, Toga uses the system native python GTK+3 bindings for display purposes. However, if you’re using a --no-site-packages virtualenv (which is the default), the Python bindings for GTK won’t be in your PYTHONPATH.

If you install Toga in a virtual environment, Toga will attempt to automatically fix the problem; however, if this fails, you’ll need to apply the fix manually. To make the system GTK+ bindings available to your virtualenv, symlink the gi module from the system dist-packages directory into your virtualenv’s site-packages:

For an Ubuntu 14.04 system::

    $ cd $VIRTUAL_ENV/lib/python3.4/site-packages
    $ ln -si /usr/lib/python3/dist-packages/gi

For a Ubuntu 16.04 system::

    $ cd $VIRTUAL_ENV/lib/python3.5/site-packages
    $ ln -si /usr/lib/python3/dist-packages/gi

For a Fedora 64bit system::

    $ cd $VIRTUAL_ENV/lib/python3.5/site-packages
    $ ln -si /usr/lib64/python3.5/site-packages/gi/

Documentation

Documentation for Toga can be found on Read The Docs.

Community

Toga is part of the BeeWare suite. You can talk to the community through:

Contributing

If you experience problems with Toga, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toga-0.2.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

toga-0.2.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file toga-0.2.1.tar.gz.

File metadata

  • Download URL: toga-0.2.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for toga-0.2.1.tar.gz
Algorithm Hash digest
SHA256 33e8cfddd3185b416a8394417dc9a986f4f3d491078b4d8aa0682fe625d68512
MD5 f19f2b238242b2ce1571f59c72e72525
BLAKE2b-256 7e2fe89047795306093badd2b08f65b4ffec852974ef6e4dd7cccca0897a1374

See more details on using hashes here.

File details

Details for the file toga-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for toga-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 afc77c02440241fcfd0ea5fe79d5607b4992bef0387ca6db99c889f1e336af4d
MD5 44487e0daf1d5da8c42e6b8db6ab7bdd
BLAKE2b-256 5692f3efc9e24442c18841bc66c8cc26af711019b4d95fb013e6790b1c415e4e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page