6.14 curses.wrapper -- Terminal handler for curses programs
Python Library Reference
Previous: 6.13.1 Textbox objects
Up: 6. Generic Operating System
Next: 6.15 curses.ascii
6.14 curses.wrapper --
Terminal handler for curses programs
New in version 1.6.
This module supplies one function, wrapper(), which runs
another function which should be the rest of your curses-using
application. If the application raises an exception,
wrapper() will restore the terminal to a sane state before
passing it further up the stack and generating a traceback.
wrapper (func, ...)
Wrapper function that initializes curses and calls another function,
func, restoring normal keyboard/screen behavior on error.
The callable object func is then passed the main window 'stdscr'
as its first argument, followed by any other arguments passed to
wrapper().
Before calling the hook function, wrapper() turns on cbreak
mode, turns off echo, enables the terminal keypad, and initializes
colors if the terminal has color support. On exit (whether normally
or by exception) it restores cooked mode, turns on echo, and disables
the terminal keypad.
Python Library Reference
Previous: 6.13.1 Textbox objects
Up: 6. Generic Operating System
Next: 6.15 curses.ascii
See About this document... for information on suggesting changes.
Wyszukiwarka
Podobne podstrony:
module cursesasciimodule cursestextpadmodule cursesmodule al constantsfunction mcrypt module get algo key sizeCISCO CCNA Certifications CCNA 2 Module 6module zipfilemodule filesmodule sunaudiodevModule HOWTO pl (3)module pprintBook 5 module 3 test Amodule Queuemodule tabnannymodule fileinput01 52 Check control module 01więcej podobnych podstron