On this page
curses.initscr
Prev: curses.init_pair | Up: curses | Next: curses.intrflush
Rel: curses.assume_default_colors, curses.baudrate, curses.beep, curses.can_change_color
Ref: docs.python.org — curses.initscr
Tags: #public #python3 #stdlib #curses
Import
import curses
from curses import initscr
Signature & Overview
curses.initscr()
curses.initscr() function.
Usage
import curses
# Low-level screen initializer; prefer curses.wrapper(main) in real apps
assert callable(curses.initscr)
Gotchas
- Prefer
curses.wrapper(main): Callinginitscr()directly risks leaving the terminal in raw/noecho mode if an exception occurs beforeendwin().
REPL Inspect
from curses import initscr
help(initscr)
Linked from
Related notes
- tuts/python3/stdlib_module/curses/init_pair Linked here; links to this page; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/intrflush Linked here; links to this page; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/curses/assume_default_colors Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/baudrate Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/beep Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/can_change_color Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/cbreak shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/color_content shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/color_pair shared tags: #curses, #stdlib