module curseswrapper





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 cursesascii
module cursestextpad
module curses
module al constants
function mcrypt module get algo key size
CISCO CCNA Certifications CCNA 2 Module 6
module zipfile
module files
module sunaudiodev
Module HOWTO pl (3)
module pprint
Book 5 module 3 test A
module Queue
module tabnanny
module fileinput
01 52 Check control module 01

więcej podobnych podstron