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 OS X, 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

  • Linux: pip install toga-gtk toga-cassowary cassowary

  • Win32: pip install toga-win32 toga-cassowary cassowary

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 (assuming Python 3.5)::

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

For a Fedora 64bit system (assuming Python 3.5)::

    $ 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-core-0.3.0.dev1.tar.gz (427.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toga_core-0.3.0.dev1-py3-none-any.whl (456.1 kB view details)

Uploaded Python 3

File details

Details for the file toga-core-0.3.0.dev1.tar.gz.

File metadata

  • Download URL: toga-core-0.3.0.dev1.tar.gz
  • Upload date:
  • Size: 427.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for toga-core-0.3.0.dev1.tar.gz
Algorithm Hash digest
SHA256 c551cb6ae8884a2cc1886c996953193585424bea50a4f937326c52f2595e36c2
MD5 ed08ecce6020b912a565d467baf41201
BLAKE2b-256 2a7c09a86df373b845000d8cf7938b736ee671ba76e3da6d982048c077f878f9

See more details on using hashes here.

File details

Details for the file toga_core-0.3.0.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for toga_core-0.3.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff43cf36ad16b79326f96f848c945acf98a8e4c13263a9301cef00f30f97b66a
MD5 7c5dc9b8456f664fb3f976a4e8a9c1c6
BLAKE2b-256 bd772e173fc3c610f0cb22f317fefe6b6651dd8c905cafa4102a23cc010f7d03

See more details on using hashes here.

Supported by

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