interaction
dev_tool.tools.interaction
log = logging.getLogger(__name__)
module-attribute
get_input_and_clear_terminal
get_user_confirmation
A function that gets a yes/no confirmation from the user.
Parameters:
-
prompt(str) –The prompt to display to the user.
Returns:
-
bool–True if the user confirmed, False otherwise.
Source code in dev_tool/tools/interaction.py
get_user_input
open_directory_in_explorer
A function that opens a directory in the system file explorer.
Parameters:
-
path(Path) –The path to the directory to open.
Source code in dev_tool/tools/interaction.py
open_url_in_browser
A function that opens a URL in the default web browser.
Parameters:
-
url(str) –The URL to open.
Source code in dev_tool/tools/interaction.py
wait_for_enter
A function that waits for Enter key using blessed's input handling.
This function uses blessed's inkey() to properly handle input, first draining any buffered input, then waiting for an Enter keypress.
Parameters:
-
terminal(Terminal) –The blessed Terminal instance for input handling.
-
message(str) –The message to display while waiting for input.