Skip to main content

This library is a collection of widgets that supported from blessed allows to create interfaces in a simple way based on events.

Project description

Tebless

Documentation Status Updates

This library is a collection of widgets that supported from blessed allows to create interfaces in a simple way based on events.

How to install

pip install tebless

Example of usage

This will render a label containing the text ‘Hello world!’, centered horizontally and vertically.

from tebless.widgets import Label, Window, Input

@Window.decorator(main=True, min_y=10)
def view(window):
    WIDTH, HEIGHT = window.size
    def callback(evt):
        evt.store.label.value = evt.value

    window += Label(
        cordy=HEIGHT / 2 - 1,
        text='Hello world!',
        width=WIDTH,
        align='center',
        ref='label'
    )
    window += Input(
        width=WIDTH,
        cordx=WIDTH / 3,
        on_enter=callback
    )

so easy is placed a text in the console that changes with the input and limit min height window you can also avoid access to the store

from tebless.widgets import Label, Window, Input

@Window.decorator(min_y=10)
def view(window):
    WIDTH, HEIGHT = window.size

    label = Label(
        cordy=HEIGHT / 2 - 1,
        text='Hello world!',
        width=WIDTH,
        align='center'
    )

    def callback(evt):
        label.value = evt.value

    window += label
    window += Input(
        width=WIDTH,
        cordx=WIDTH / 3,
        on_enter=callback
    )
if __name__ == "__main__":
    view()

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

1.2.0 (2017-11-24)

  • Restructured project.

Project details


Release history Release notifications

This version
History Node

1.2.3

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.1.3.dev9

History Node

1.1.3.dev8

History Node

1.1.1.dev3

History Node

1.0.3

History Node

1.0.2

History Node

1.0.0

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
tebless-1.2.3-py2.py3-none-any.whl (19.8 kB) Copy SHA256 hash SHA256 Wheel 3.6 Dec 8, 2017
tebless-1.2.3.tar.gz (28.3 kB) Copy SHA256 hash SHA256 Source None Dec 8, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page