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, the Python bindings for GTK won’t be in your PYTHONPATH.

Unfortunately, you can’t pip install GTK+ bindings, so you have to use a workaround. 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 a Ubuntu 32bit system::

    $ cd $VIRTUAL_ENV/lib/python2.7/site-packages
    $ ln -si /usr/lib/python2.7/dist-packages/gi

For a Fedora 64bit system::

    $ cd $VIRTUAL_ENV/lib/python2.7/site-packages
    $ ln -si /usr/lib64/python2.7/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

This version

0.2.0

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.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

toga-0.2.0-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for toga-0.2.0.tar.gz
Algorithm Hash digest
SHA256 85130ea9279bbcfa8ff68cc62e0e43640d1bc66b202705c6042bcad19feb9ab7
MD5 a0da1a6059920bf9aeebdae613a878e5
BLAKE2b-256 0b2865ce43914ea2736c15289c33fe28a8f45fa9433a1ed5fc8123033ce6b80b

See more details on using hashes here.

File details

Details for the file toga-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for toga-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9289e36327dc36041f26af625dba0ef0e7f62358964adaa953bdf3e244fa814d
MD5 0681ce27c7306cc990dfedc3f5f4d652
BLAKE2b-256 7fbc56b13ed4113dd74c4e8c3ed2b47b42777e2241d2bf932494f1f78a2818f9

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