Giter Site home page Giter Site logo

toga's Introduction

Toga

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, symlinking 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.

Related projects

This package is a top level package. It depends on the use of platform-specific backends to provide real functionality:

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.

toga's People

Contributors

00willo avatar bmjhayward avatar freakboy3742 avatar gregmuellegger avatar jackscottau avatar jamalex avatar jefftriplett avatar jmsbrry avatar roadsideseb avatar rtfd avatar vfuc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.