Skip to main content

Runtime Python utilities

Project description

A small collection of tools to display messages and prompts with autocompletion and interactive menus. It is partly based on bullet.

Quick start

Import the module

import clinterface

Create a default Selector instance

selector = clinterface.Selector()

or create a customized Selector instance

selector = clinterface.Selector(
   shift = 1,
   indent = 3,
   align = 2,
   margin = 1,
   pad_left = 1,
   pad_right = 1,
   radiobullet = '*',
   checkbullet = '+',
)

Set the message, options and default choice

selector.message = 'Choose the best day of the week:'
selector.options = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
selector.default = 'Friday'

and prompt for a single choice

selector.single_choice()

Set the message and default choices but use the same options

selector.message = 'Choose the best days of the week:'
selector.default = ['Friday', 'Saturday']

and prompt for multiple choices

selector.multiple_choice()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

clinterface-0.1.0-py3-none-any.whl (10.8 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