Skip to content

command

dev_tool.tui.command

TerminalCommand

Bases: StrEnum

An enumeration of terminal commands.

CLEAR = 'cls' if sys.platform == OperatingSystem.WINDOWS else 'clear' class-attribute instance-attribute

clear_terminal

A function that clears the terminal screen.

Source code in dev_tool/tui/command.py
def clear_terminal() -> None:
    """A function that clears the terminal screen."""

    subprocess.run(
        TerminalCommand.CLEAR,
        check=True,
        shell=True
    )