Skip to content

Instantly share code, notes, and snippets.

View twenty-twenty's full-sized avatar

twenty-twenty

View GitHub Profile
@twenty-twenty
twenty-twenty / button.py
Created July 20, 2021 13:45
A modified version of asciimatics' button.py that is able to return an assigned value
# -*- coding: utf-8 -*-
"""This module defines a button widget"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from asciimatics.event import KeyboardEvent, MouseEvent
from asciimatics.widgets.widget import Widget
class Button(Widget):