---
name: "ptg"
section: "1"
platform: "linux"
package: "pytermgui"
version: "7.7.3+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ptg"
---

# ptg(1)

Python TUI framework with multi-feature support

## NAME

**pytermgui** - Python TUI framework with multi-feature support

## SYNOPSIS

```
 ptg  [-h] [--app Getch, Inspect, Color, Tim] [-g] [-t] [-c] [-i PATH_OR_CODE] [-e] [--methods] [--dunder] [--private] [-s]
    [-v] [--palette] [--highlight [SYNTAX]] [--exec [EXEC]] [-f FILE] [--print-only] [--export-svg FILE] [--export-html FILE]
```

## DESCRIPTION

**Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!**

## OPTIONS

**options:**

- **-h, --help**

  **show this help message and exit**

**Applications:** **--app Getch, Inspect, Color,** *Tim* **Launch an app.**

- **-g, --getch**

  **Launch the Getch app.**

- **-t, --tim**

  **Launch the TIM Playground app.**

- **-c, --color**

  **Launch the ColorPicker app.**

**Inspection:** **-i** *PATH\_OR\_CODE***, --inspect** *PATH\_OR\_CODE* **Inspect an object.**

- **-e, --eval**

  **Evaluate the expression given to \`--inspect\` instead of treating it as a path.**

- **--methods**

  **Always show methods when inspecting.**

- **--dunder**

  **Always show \_\_dunder\_\_ methods when inspecting.**

- **--private**

  **Always show \_private methods when inspecting.**

**Utilities:**

- **-s, --size**

  **Output the current terminal size in WxH format.**

- **-v, --version**

  **Print version & system information.**

- **--palette**

  **Print the default PyTermGUI color palette.**

- **--highlight \[*SYNTAX*\]**

  **Highlight some python-like code syntax. No argument or '-' will read STDIN.**

- **--exec \[*EXEC*\]**

  **Execute some Python code. No argument or '-' will read STDIN.**

- **-f *FILE*, --file *FILE***

  **Interpret a PTG-YAML file.**

- **--print-only**

  **When interpreting YAML, print the environment without running it interactively.**

**Exporters:**

- **--export-svg *FILE***

  **Export the result of any non-interactive argument as an SVG file.**

- **--export-html *FILE***

  **Export the result of any non-interactive argument as an HTML file.**
