PTWM
cli

ptwm.cli.utils

ptwm.cli.utils

pymodule

ptwm.cli.utils

python/ptwm/cli/utils.py:1
module ptwm.cli.utils
pyfunction

ptwm.cli.utils.check_and_install_ptwm

python/ptwm/cli/utils.py:15
def check_and_install_ptwm() -> None

Check if ptwm is installed, and exit with instructions otherwise.

pyconstant

ptwm.cli.utils.GB

python/ptwm/cli/utils.py:7
GB = 1024 * 1024 * 1024
pyconstant

ptwm.cli.utils.GREEN

python/ptwm/cli/utils.py:11
GREEN = '\x1b[92m'
pyconstant

ptwm.cli.utils.KB

python/ptwm/cli/utils.py:5
KB = 1024
pyconstant

ptwm.cli.utils.MB

python/ptwm/cli/utils.py:6
MB = 1024 * 1024
pyfunction

ptwm.cli.utils.parse_streaming_chunk_size

python/ptwm/cli/utils.py:28
def parse_streaming_chunk_size(streaming_chunk_size: int | str) -> int

Parse the streaming chunk size from a string or integer.

pyconstant

ptwm.cli.utils.RED

python/ptwm/cli/utils.py:9
RED = '\x1b[91m'
pyfunction

ptwm.cli.utils.replace_in_file

python/ptwm/cli/utils.py:56
def replace_in_file(file_path: Path, old: str, new: str) -> None

Replace all occurrences of `old` with `new` in a file.

pyconstant

ptwm.cli.utils.RESET

python/ptwm/cli/utils.py:12
RESET = '\x1b[0m'
pyconstant

ptwm.cli.utils.YELLOW

python/ptwm/cli/utils.py:10
YELLOW = '\x1b[93m'