Skip to content

Python "input" module enhancements, such as combining colorama and updates to johejo's "inputimeout" library.

License

Notifications You must be signed in to change notification settings

nga-27/enhanced-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enhanced-input

Python "input" module enhancements, such as combining colorama and updates to johejo's "inputimeout" library.

enter into an input

Image created by Bing Image Creator (Dall-e 3)

This repo was based off johenjo's inputtimeout implementation. However, since that repo is a public archive, and there are other ways I want to handle timed-out inputs, I decided to create my own variation. In addition, this repo library also includes the employment of colorama as optional styling. (Currently, version 0.1.0 of this library only supports text color and not background colors.)

Version 0.1.0


Installation

# Install main
pip install enhanced_input@git+ssh://git@github.com/nga-27/enhanced-input.git@main

# Specific version
pip install enhanced_input@git+ssh://git@github.com/nga-27/enhanced-input.git@v0.1.0

Usage

from enhanced_input import EnhancedInput, EnhancedInputColor

e_input = EnhancedInput()

# prompt input with default timeout (~30s)
e_input.input("What's your name? ")

# prompt input with modified timeout (5.1s)
e_input.input(">>> ", timeout=5.1)

# prompt input with modified timeout and color change (cyan)
e_input.input(">>> ", timeout=5.1, text_color=EnhancedInputColor.CYAN)

About

Python "input" module enhancements, such as combining colorama and updates to johejo's "inputimeout" library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages