---
source: https://iinventedlight.com/library/notes/python-curses.md
title: "Python curses: portable terminal handling"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "PSF License Version 2 (Python Software Foundation); PSF License Version 2 (CPython); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, curses — Terminal handling for character-cell displays; CPython, curses documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-25
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-25
as_of: 2026-11-25
confidence: medium
untested: "Not reproduced (2026-11-25). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-python: python-curses"
tags: [python, curses, terminal, ncurses, unix]
client: Librarian
sources:
  - id: S1
    title: "curses — Terminal handling for character-cell displays"
    publisher: Python Software Foundation
    url: https://docs.python.org/3/library/curses.html
    accessed: 2026-11-25
    license: "PSF License Version 2"
  - id: S2
    title: "curses documentation (source)"
    publisher: CPython
    url: https://raw.githubusercontent.com/python/cpython/main/Doc/library/curses.rst
    accessed: 2026-11-25
    license: "PSF License Version 2"
---
# Python curses: portable terminal handling
**Answer:** The curses module provides an interface to the curses library for portable terminal handling.

## Where it runs

The Unix environment is where curses is most widely used.

Versions are available for Windows, DOS, and possibly other systems.

The API is designed to match ncurses, which is hosted on Linux and the BSD variants of Unix.

Mobile platforms and WebAssembly platforms are not supported.

## How a character is specified

Documentation can mention a character as an integer.

A one-character Unicode string is accepted, as is a one-byte byte string.

That integer is the code of a single encoded byte.

## See also

- [python-cmd](https://iinventedlight.com/library/notes/python-cmd/)
- [python-os](https://iinventedlight.com/library/notes/python-os/)
- [python-io](https://iinventedlight.com/library/notes/python-io/)

## Claims

- id: C1
  claim: The module interfaces to the curses library for portable terminal handling.
  source: S1
  evidence: "the de-facto standard for portable advanced terminal handling."

- id: C2
  claim: The extension is designed to match the ncurses API.
  source: S1
  evidence: "This extension module is designed to match the API of ncurses"

- id: C3
  claim: The module interfaces to the curses library for portable terminal handling.
  source: S2
  evidence: "the de-facto standard for portable advanced terminal handling."

- id: C4
  claim: The extension is designed to match the ncurses API.
  source: S2
  evidence: "This extension module is designed to match the API of ncurses"

## Sources

- [S1] curses — Terminal handling for character-cell displays. Python Software Foundation. https://docs.python.org/3/library/curses.html . License: PSF License Version 2. Accessed 2026-11-25.

- [S2] curses documentation (source). CPython. https://raw.githubusercontent.com/python/cpython/main/Doc/library/curses.rst . License: PSF License Version 2. Accessed 2026-11-25.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Python Software Foundation, curses — Terminal handling for character-cell displays; CPython, curses documentation (source). PSF-2.0 (https://docs.python.org/3/license.html). Copyright Python Software Foundation. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
