API Documentation

Here you will find the api documentation of pycli_tools.

Summary

pycli_tools.parsers.get_argparser Explain here the get_argparser() function ..
pycli_tools.rawinput.ask_user_yesno Helper function that wraps python’s read_input() function.

Modules

The pycli_tools module is devided in 2 submodules.

pycli_tools.parsers.get_argparser(**kwargs)

Explain here the get_argparser() function

Warning

If you pass the ‘parents’ keyword argument it will be overwritten by the get_argparser() function.

pycli_tools.rawinput.ask_user_yesno(message='Are you sure you want to continue?', yes_on_enter=True, yes='y', no='n')

Helper function that wraps python’s read_input() function.

Use this if your program should rely on simple user input like asking for confirmation to continue.

Possible answers are yes or no. You can also specify the default answer to take if the user provides no input.

Arguments:

message
The question you want to display.
yes_on_enter
The default action to take when the user provides no input (e.g. just presses [enter]).
yes
Letter to use for a positive answer.
no
Letter to use for a negative answer.

Returns:

True if the user answers positively, False otherwise.

Table Of Contents

Previous topic

Examples

This Page