license_updater.utils package¶
Submodules¶
license_updater.utils.fileio module¶
- license_updater.utils.fileio.copyfile(source, destination, force=True)[source]¶
Copy a file from a source to its destination.
- license_updater.utils.fileio.get_tmpdir(tmpdir=None, prefix='', create=True)[source]¶
Get a temporary directory for an operation.
- license_updater.utils.fileio.get_tmpfile(tmpdir=None, prefix='')[source]¶
Get a temporary file with an optional prefix.
- license_updater.utils.fileio.mkdir_p(path)[source]¶
Make a directory path if it does not exist, akin to mkdir -p
- license_updater.utils.fileio.recursive_find(base, pattern=None)[source]¶
Find filenames that match a particular pattern, and yield them.
license_updater.utils.terminal module¶
- license_updater.utils.terminal.confirm_action(question, force=False)[source]¶
confirm if the user wants to perform a certain action
Parameters¶
question: the question that will be asked force: if the user wants to skip the prompt
- license_updater.utils.terminal.get_installdir()[source]¶
get the installation directory of the application
- license_updater.utils.terminal.run_command(cmd, sudo=False, stream=False)[source]¶
run_command uses subprocess to send a command to the terminal.
Parameters¶
cmd: the command to send, should be a list for subprocess error_message: the error message to give to user if fails, if none specified, will alert that command failed.