Skip to main content

A python package for UNIX terminal utilities

Project description

terminal-utils

A python package for UNIX terminal utilities

Menu

Getting started

Installation

With public pip repository

pip install ers-terminal-utils

Uninstallation

pip uninstall ers-terminal-utils

Usage

Dynamic choices via terminal

Mode: one choice (Source Code)

from terminal_utils.choices_via_terminal import ChoicesViaTerminal

LIST_OF_CHOICES = [
    'Option 1',
    'Option 2',
    'Option 3',
    'Option 4',
    'Option 5'
]
TITTLE = 'Choose an option'
response = ChoicesViaTerminal(TITTLE, LIST_OF_CHOICES).main()
chosen_option_index, chosen_option_text = response[0]

print()
print('Chosen option index: {}\n'
      'Chosen option text: {}'.format(chosen_option_index, chosen_option_text))

Mode: Multiple choices (Source Code)

from terminal_utils.choices_via_terminal import ChoicesViaTerminal

LIST_OF_CHOICES = [
    'Option 1',
    'Option 2',
    'Option 3',
    'Option 4',
    'Option 5'
]
TITTLE = 'Choose one or more options'
response = ChoicesViaTerminal(TITTLE, LIST_OF_CHOICES,
                              mode='multiple_choices').main()

print('')
for chosen_option_index, chosen_option_text in response:
    print(
        '- Chosen option index: {}|Chosen option text: {}'.format(chosen_option_index,
                                                                  chosen_option_text)
    )

LICENSE

This project is licensed under the MIT License - see the LICENSE page for details.

License MIT

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

ers-terminal-utils-0.0.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ers_terminal_utils-0.0.2-py2.py3-none-any.whl (9.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ers-terminal-utils-0.0.2.tar.gz.

File metadata

  • Download URL: ers-terminal-utils-0.0.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for ers-terminal-utils-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b9db69a6e199ada690e3dcfd93a45fee638a3f398f0907221ff539c9bceec286
MD5 c2e0c2bddc3e624437d59c2e8e55381c
BLAKE2b-256 709e1b11863631349daa270621048ea22025120a12365d63ab66352f66d63923

See more details on using hashes here.

File details

Details for the file ers_terminal_utils-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ers_terminal_utils-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8610e5f437c41bed38d931b98a55e821b5ee2e6f4dc5ee3b9ea3f4ffb0dcf86d
MD5 18a09db415951764ffc4c1273ee15a92
BLAKE2b-256 e7035619469258f2fd71d97c699a8df013d1d713e647187109449776d57a83a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page