Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python dictionaries support for Plover

Project Description

Add support for Python dictionaries to Plover. A Python dictionary is simply a single module with the following API:

# Length of the longest supported key (number of strokes).

# Lookup function: return the translation for <key> (a tuple of strokes)
# or raise KeyError if no translation is available/possible.
def lookup(key):
    assert len(key) <= LONGEST_KEY
    raise KeyError

# Optional: return an array of stroke tuples that would translate back
# to <text> (an empty array if not possible).
def reverse_lookup(text):
    return []

For example with the following dictionary:



def lookup(key):
    assert len(key) <= LONGEST_KEY, '%d/%d' % (len(key), LONGEST_KEY)
    if SHOW_STROKE_STENO != key[0]:
        raise KeyError
    if len(key) == 1:
        return ' '
    return key[1]

If you stroke STR*, then the next stroke will be shown verbatim (untranslated), e.g. -T STROEBG TP-R KW-GS STROEBG KR-GS S STR* STROEBG outputs: the stroke for "stroke" is STROEBG.

Release History

This version
History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.8 kB) Copy SHA256 Hash SHA256
Wheel py3 Nov 11, 2017
(3.6 kB) Copy SHA256 Hash SHA256
Source None Nov 11, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting