Functions
probe_ambiguous_width
1
int | None
▼
Probe the terminal to determine the rendered width of ambiguous characters.
Wr…
probe_ambiguous_width
1
int | None
▼
def probe_ambiguous_width(timeout: float = 0.1) -> int | None
Probe the terminal to determine the rendered width of ambiguous characters.
Writes a known ambiguous-width character and measures cursor movement
using ANSI escape codes. Returns 1 or 2 on success, orNoneif
probing is not possible (non-TTY, non-Unix, timeout, etc.).
Parameters
| Name | Type | Description |
|---|---|---|
timeout |
float |
Maximum seconds to wait for terminal response. Default:0.1
|
Returns
int | None
_probe_tty
4
int | None
▼
TTY-dependent probe internals. Requires a real terminal to exercise.
_probe_tty
4
int | None
▼
def _probe_tty(select, termios, tty, timeout: float) -> int | None
Parameters
| Name | Type | Description |
|---|---|---|
select |
— |
|
termios |
— |
|
tty |
— |
|
timeout |
float |
Returns
int | None