Skip to content

Kemichal/cursesinquirer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Curses Inquirer PyPI

A python library to create curses based CLIs.

Usage

from cursesinquirer import CursesInquirer, Select


# Define your program
def program(ci):
    tasks = ["Say hello", "Exit"]
    task = ci.ask(Select("What do you want to do?", tasks))
    
    if task == tasks[0]:
        print("Hello!")
    elif task == tasks[1]:
        exit(0)

# Run your program in a Curses Inquirer context.
CursesInquirer(program)

More examples available in examples folder.

Customizability

The builtin question components does not have a lot of customizability options. That said you can create your own to suite your needs. Create a class that inherits from the abstract base class Question and implement the necessary methods.

Limitations

See issues.

Similar libraries

Here is a list of similar libraries that have been an inspiration to this library and might fit your needs better.

License

MIT, see LICENSE file.

About

A python library to create curses based CLIs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages