Skip to main content

No project description provided

Project description

Interactive buttons

Interactive Buttons is a Python package which allows you to create buttons in the command prompt.

How to use it ?

To use IB, you have to use keyboard arrows to select the option you want and the enter key to execute the button linked function.

Install IB

  pip install interactive_buttons

Usage/Examples

import interactive_buttons
print("Choose what you wants to do :")

def say_hello():
    print("Hello !")

def add(number_one, number_two):
    print(number_one + number_two)

buttons = [["Say hello", say_hello],
           ["Do math", add, (2, 2)]]

interactive_buttons.linear_buttons(buttons)

Output :

Author

@mbcraft-exe

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

interactive_buttons-1.5.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

interactive_buttons-1.5-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

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