Terminal Interface Modules

curses.ascii

Classifies and transforms ASCII characters independently of locale. Predicates accept integer codes or single-character strings; ASCII digit and letter tests do not implement general Unicode character classification. Useful for interpreting control characters.

Formal Syntax & Structure

python syntaxpython
import curses.ascii

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
from curses.ascii import isdigit, isalphaprint(isdigit("7"), isalpha("é"))
Python Reference