philh_myftp_biz.terminal

Subpackages

Submodules

Package Contents

Functions

width

Get the # of columns in the terminal

del_last_line

Clear the previous line in the terminal

is_elevated

Check if the current execution has Administrator Access

elevate

Restart the current execution as Administrator

write

Write text to the sys.stdout or sys.stderr buffer

print

Wrapper for built-in print function

input

Ask for user input from the terminal

pause

Pause the execution and wait for user input

dash

Print dashes to the terminal

cls

Clear the terminal window

warn

Print an exception to the terminal without stopping the execution

get_module

main_module

set_package

script_file

Data

_cls_hex

_cls_cmd

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.set_package(path: str | Path)
philh_myftp_biz.terminal.script_file()