philh_myftp_biz.terminal¶
Subpackages¶
Submodules¶
Package Contents¶
Functions¶
Get the # of columns in the terminal |
|
Clear the previous line in the terminal |
|
Check if the current execution has Administrator Access |
|
Restart the current execution as Administrator |
|
Write text to the sys.stdout or sys.stderr buffer |
|
Wrapper for built-in print function |
|
Ask for user input from the terminal |
|
Pause the execution and wait for user input |
|
Print dashes to the terminal |
|
Clear the terminal window |
|
Print an exception to the terminal without stopping the execution |
|
Data¶
API¶
- philh_myftp_biz.terminal._cls_hex = '8005951a000000000000008c162a2a2a20436c656172205465726d696e616c202a2a2a942e'¶
- philh_myftp_biz.terminal._cls_cmd: str = None¶
- philh_myftp_biz.terminal.width() int¶
Get the # of columns in the terminal
- philh_myftp_biz.terminal.del_last_line() None¶
Clear the previous line in the terminal
- philh_myftp_biz.terminal.is_elevated() bool¶
Check if the current execution has Administrator Access
- philh_myftp_biz.terminal.elevate() None¶
Restart the current execution as Administrator
- philh_myftp_biz.terminal.write(text: str, stream: Literal[out, err] = 'out', flush: bool = True) None¶
Write text to the sys.stdout or sys.stderr buffer
- philh_myftp_biz.terminal.print(*args: str, pause: bool = False, color: philh_myftp_biz.db.Color.names = 'DEFAULT', sep: str = ' ', end: str = '\n', overwrite: bool = False) None¶
Wrapper for built-in print function
- philh_myftp_biz.terminal.input(prompt: str, timeout: int = None, default: philh_myftp_biz.terminal.input.D = None) philh_myftp_biz.terminal.input.D | str¶
Ask for user input from the terminal
Will return default upon timeout
- philh_myftp_biz.terminal.pause() None¶
Pause the execution and wait for user input
- philh_myftp_biz.terminal.dash(p: int = 100) None¶
Print dashes to the terminal
(p is the % of the terminal width)
Ex: dash(50) -> |————- |
- philh_myftp_biz.terminal.cls() None¶
Clear the terminal window
(Prints a hexidecimal value so it can be detected from a subprocess)
- philh_myftp_biz.terminal.warn(exc: Exception) None¶
Print an exception to the terminal without stopping the execution
- philh_myftp_biz.terminal.get_module(name: str)¶
- philh_myftp_biz.terminal.main_module()¶
- philh_myftp_biz.terminal.script_file()¶