Skip to main content

A Pythonic Wrapper for Tkinter

Project description

A Pythonic Wrapper for Tkinter

I’ve always had a love/hate relationship with Tkinter. On the one hand, it almost always comes with Python, which makes it the easiest option for making a GUI in Python. On the other hand, it’s one of the least Pythonic modules in existance.

So I’ve decided to write and share this - FinGUI. It’s a GUI package for Python written in pure Python, meaning it’s trivial to install, unlike pretty much every other GUI package for Python.

Installation

Install via pip:

$ pip install fingui

Done.

If you insist on the (slightly) harder way of installing, from source, you know how to do it already and don’t need my help.

The most up-to-date version of this library can be found on github at https://github.com/TaylorSMarks/FinGUI

Quick Start

Once you’ve installed, you can really quickly verified that it works with just this:

>>> from fingui import Entry
>>> e = Entry()
>>> e.set('Hello World!')

That’ll work right from your command line. You can also drop the same code into a script and run it with no modification.

Note the boilerpoint we didn’t deal with, because it’s all automatically handled:
  • We didn’t call mainloop().

  • We didn’t need to create a root object (although we could have).

  • We didn’t need to call pack().

Also note that Entry has a set() method! Unlike the variant in Tkinter, ours has the methods you would expect.

The toplevel example.py file demonstrates how you can combine the Entry and Menu classes to quickly make a polished AutocompletePathEntry class in under 50 lines of code.

Documentation

I’ve tried to include docstrings with all the functions and classes, so things like this should work:

>>> import fingui
>>> help(fingui)

If this project grows large enough, I’ll try to create some more formal documentation for it.

Requirements

FinGUI has been tested on Python 2.7 on OS X 10.11 and Windows 7. It is intended to work on both Python 2.6+ and 3.2+, with any OS that supports Tkinter. It probably falls short on Python 3; I wouldn’t know because of how rarely I touch it. Please submit pull requests to fix anything that doesn’t work on Python 3.

Project details


Download files

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

Source Distribution

fingui-0.2.4.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file fingui-0.2.4.tar.gz.

File metadata

  • Download URL: fingui-0.2.4.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fingui-0.2.4.tar.gz
Algorithm Hash digest
SHA256 108c8123748880b852dee961e483833395d9bf9ec1aa839076993088a0760697
MD5 1703e918c3ab98a919453333052108d9
BLAKE2b-256 e9669f3322ee1044c38416342fb514acb14110406d7585e072ba9830968e6176

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