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.10 (Yosemite) 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.dev30.tar.gz (504.3 kB view details)

Uploaded Source

Built Distribution

toga_core-0.3.0.dev30-py3-none-any.whl (489.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: toga-core-0.3.0.dev30.tar.gz
  • Upload date:
  • Size: 504.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for toga-core-0.3.0.dev30.tar.gz
Algorithm Hash digest
SHA256 80ff766857a649c33b8b48de690d5fa63b5d1b8cbdc5bbc6cbdec44fbc46246c
MD5 6cd4bf4cfdbb77fed0a12348b82cb1d5
BLAKE2b-256 a284f0de4ee63168e7e50f57060e6e29a6c9315d7eda8c9e91f262f0a31624ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: toga_core-0.3.0.dev30-py3-none-any.whl
  • Upload date:
  • Size: 489.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for toga_core-0.3.0.dev30-py3-none-any.whl
Algorithm Hash digest
SHA256 d5cd77d5b0705b8036c1619824ee29f3c9f03c37428998d2161091c19bfab1fe
MD5 6659bfdd77d01683f1349615d1c7cb9a
BLAKE2b-256 3d42d3ad3beb9e75fb02fa77d458e39b64b942485905ec8ef73d40f77741af9a

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