helper_functions module

helper_functions.cls()[source]

cls() will clear the screen. Works in linux or windows

helper_functions.datetag()[source]
helper_functions.mainloop()[source]

Just a test routine that will present the user with a list of the days of the week for selection IF the module is run in its own right rather than being called from another module.

helper_functions.menu(options, title='Your options are:', prompt='Select an option by number: ')[source]

The menu function numbers and presents a set of options to the user, expects the user to select the number that equates to the option to be selected and returns that option.

Parameters:
  • options (tuple of str) – Set of options to be presented to the user, defaults to (no default option)
  • title (str) – The title that will appear at the top of the set of options, defaults to “Your options are:”
  • prompt (str) – The text that will appear at the bottom of the set of options prompting the user to make a selection, defaults to “Select an option by number: “
Returns:

option selected by user

Return type:

str

helper_functions.mysql_backup(sdb, shost, username, password)[source]
helper_functions.underline(text)[source]

Underlines text (with equals signs).

Parameters:text (str) – The text to be underlined
Returns:Single string made up of the supplied text, a carriage return and the appropriate number of equals signs.
Return type:str