bag.console module¶
Functions for user interaction at the terminal/console.
- bag.console.announce(*a)[source]¶
Make this message stand out from all the noise in the console.
- Return type
None
- bag.console.ask(prompt='', default='')[source]¶
Print the
prompt
, get user’s answer, return it – or a default.- Return type
str
- bag.console.bool_input(prompt, default=None)[source]¶
Print
prompt
; return True or False based on the user’s choice.- Return type
bool
- bag.console.int_input(prompt)[source]¶
Print
prompt
; ensure the user enters an integer and return it.- Return type
Optional
[int
]