Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « curses »

Liste des classes du module curses

Nom de la classe Description
window

Liste des exceptions du module curses

Nom de la classe d'exception Description
error

Liste des fonctions du module curses

Signature de la fonction Description
baudrate() Return the output speed of the terminal in bits per second. [extrait de baudrate.__doc__]
beep() Emit a short attention sound. [extrait de beep.__doc__]
can_change_color() Return True if the programmer can change the colors displayed by the terminal. [extrait de can_change_color.__doc__]
cbreak(flag=True) Enter cbreak mode. [extrait de cbreak.__doc__]
color_content(color_number) Return the red, green, and blue (RGB) components of the specified color. [extrait de color_content.__doc__]
color_pair(pair_number) Return the attribute value for displaying text in the specified color. [extrait de color_pair.__doc__]
curs_set(visibility) Set the cursor state. [extrait de curs_set.__doc__]
def_prog_mode() Save the current terminal mode as the "program" mode. [extrait de def_prog_mode.__doc__]
def_shell_mode() Save the current terminal mode as the "shell" mode. [extrait de def_shell_mode.__doc__]
delay_output(ms) Insert a pause in output. [extrait de delay_output.__doc__]
doupdate() Update the physical screen to match the virtual screen. [extrait de doupdate.__doc__]
echo(flag=True) Enter echo mode. [extrait de echo.__doc__]
endwin() De-initialize the library, and return terminal to normal status. [extrait de endwin.__doc__]
erasechar() Return the user's current erase character. [extrait de erasechar.__doc__]
filter()
flash() Flash the screen. [extrait de flash.__doc__]
flushinp() Flush all input buffers. [extrait de flushinp.__doc__]
get_escdelay() Gets the curses ESCDELAY setting. [extrait de get_escdelay.__doc__]
get_tabsize() Gets the curses TABSIZE setting. [extrait de get_tabsize.__doc__]
getmouse() Retrieve the queued mouse event. [extrait de getmouse.__doc__]
getsyx() Return the current coordinates of the virtual screen cursor. [extrait de getsyx.__doc__]
getwin(file) Read window related data stored in the file by an earlier putwin() call. [extrait de getwin.__doc__]
halfdelay(tenths) Enter half-delay mode. [extrait de halfdelay.__doc__]
has_colors() Return True if the terminal can display colors; otherwise, return False. [extrait de has_colors.__doc__]
has_extended_color_support() Return True if the module supports extended colors; otherwise, return False. [extrait de has_extended_color_support.__doc__]
has_ic() Return True if the terminal has insert- and delete-character capabilities. [extrait de has_ic.__doc__]
has_il() Return True if the terminal has insert- and delete-line capabilities. [extrait de has_il.__doc__]
has_key(key) Return True if the current terminal type recognizes a key with that value. [extrait de has_key.__doc__]
init_color(color_number, r, g, b) Change the definition of a color. [extrait de init_color.__doc__]
init_pair(pair_number, fg, bg) Change the definition of a color-pair. [extrait de init_pair.__doc__]
initscr()
intrflush(flag)
is_term_resized(nlines, ncols) Return True if resize_term() would modify the window structure, False otherwise. [extrait de is_term_resized.__doc__]
isendwin() Return True if endwin() has been called. [extrait de isendwin.__doc__]
keyname(key) Return the name of specified key. [extrait de keyname.__doc__]
killchar() Return the user's current line kill character. [extrait de killchar.__doc__]
longname() Return the terminfo long name field describing the current terminal. [extrait de longname.__doc__]
meta(yes) Enable/disable meta keys. [extrait de meta.__doc__]
mouseinterval(interval) Set and retrieve the maximum time between press and release in a click. [extrait de mouseinterval.__doc__]
mousemask(newmask) Set the mouse events to be reported, and return a tuple (availmask, oldmask). [extrait de mousemask.__doc__]
napms(ms) Sleep for specified time. [extrait de napms.__doc__]
newpad(nlines, ncols) Create and return a pointer to a new pad data structure. [extrait de newpad.__doc__]
newwin newwin(nlines, ncols, [begin_y=0, begin_x=0]) [extrait de newwin.__doc__]
nl(flag=True) Enter newline mode. [extrait de nl.__doc__]
nocbreak() Leave cbreak mode. [extrait de nocbreak.__doc__]
noecho() Leave echo mode. [extrait de noecho.__doc__]
nonl() Leave newline mode. [extrait de nonl.__doc__]
noqiflush() Disable queue flushing. [extrait de noqiflush.__doc__]
noraw() Leave raw mode. [extrait de noraw.__doc__]
pair_content(pair_number) Return a tuple (fg, bg) containing the colors for the requested color pair. [extrait de pair_content.__doc__]
pair_number(attr) Return the number of the color-pair set by the specified attribute value. [extrait de pair_number.__doc__]
putp(string) Emit the value of a specified terminfo capability for the current terminal. [extrait de putp.__doc__]
qiflush(flag=True) Enable queue flushing. [extrait de qiflush.__doc__]
raw(flag=True) Enter raw mode. [extrait de raw.__doc__]
reset_prog_mode() Restore the terminal to "program" mode, as previously saved by def_prog_mode(). [extrait de reset_prog_mode.__doc__]
reset_shell_mode() Restore the terminal to "shell" mode, as previously saved by def_shell_mode(). [extrait de reset_shell_mode.__doc__]
resetty() Restore terminal mode. [extrait de resetty.__doc__]
resize_term(nlines, ncols) Backend function used by resizeterm(), performing most of the work. [extrait de resize_term.__doc__]
resizeterm(nlines, ncols) Resize the standard and current windows to the specified dimensions. [extrait de resizeterm.__doc__]
savetty() Save terminal mode. [extrait de savetty.__doc__]
set_escdelay(ms) Sets the curses ESCDELAY setting. [extrait de set_escdelay.__doc__]
set_tabsize(size) Sets the curses TABSIZE setting. [extrait de set_tabsize.__doc__]
setsyx(y, x) Set the virtual screen cursor. [extrait de setsyx.__doc__]
setupterm(term=None, fd=-1) Initialize the terminal. [extrait de setupterm.__doc__]
start_color()
termattrs() Return a logical OR of all video attributes supported by the terminal. [extrait de termattrs.__doc__]
termname() Return the value of the environment variable TERM, truncated to 14 characters. [extrait de termname.__doc__]
tigetflag(capname) Return the value of the Boolean capability. [extrait de tigetflag.__doc__]
tigetnum(capname) Return the value of the numeric capability. [extrait de tigetnum.__doc__]
tigetstr(capname) Return the value of the string capability. [extrait de tigetstr.__doc__]
tparm(str, i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0) Instantiate the specified byte string with the supplied parameters. [extrait de tparm.__doc__]
typeahead(fd) Specify that the file descriptor fd be used for typeahead checking. [extrait de typeahead.__doc__]
unctrl(ch) Return a string which is a printable representation of the character ch. [extrait de unctrl.__doc__]
unget_wch(ch) Push ch so the next get_wch() will return it. [extrait de unget_wch.__doc__]
ungetch(ch) Push ch so the next getch() will return it. [extrait de ungetch.__doc__]
ungetmouse(id, x, y, z, bstate) Push a KEY_MOUSE event onto the input queue. [extrait de ungetmouse.__doc__]
update_lines_cols()
use_default_colors() Allow use of default values for colors on terminals supporting this feature. [extrait de use_default_colors.__doc__]
use_env(flag) Use environment variables LINES and COLUMNS. [extrait de use_env.__doc__]
wrapper(func, /, *args, **kwds) Wrapper function that initializes curses and calls another function, [extrait de wrapper.__doc__]

Liste des variables globales du module curses

Nom de la variable globale Valeur
A_ALTCHARSET 4194304
A_ATTRIBUTES 4294967040
A_BLINK 524288
A_BOLD 2097152
A_CHARTEXT 255
A_COLOR 65280
A_DIM 1048576
A_HORIZONTAL 33554432
A_INVIS 8388608
A_ITALIC 2147483648
A_LEFT 67108864
A_LOW 134217728
A_NORMAL 0
A_PROTECT 16777216
A_REVERSE 262144
A_RIGHT 268435456
A_STANDOUT 65536
A_TOP 536870912
A_UNDERLINE 131072
A_VERTICAL 1073741824
ALL_MOUSE_EVENTS 268435455
BUTTON1_CLICKED 4
BUTTON1_DOUBLE_CLICKED 8
BUTTON1_PRESSED 2
BUTTON1_RELEASED 1
BUTTON1_TRIPLE_CLICKED 16
BUTTON2_CLICKED 128
BUTTON2_DOUBLE_CLICKED 256
BUTTON2_PRESSED 64
BUTTON2_RELEASED 32
BUTTON2_TRIPLE_CLICKED 512
BUTTON3_CLICKED 4096
BUTTON3_DOUBLE_CLICKED 8192
BUTTON3_PRESSED 2048
BUTTON3_RELEASED 1024
BUTTON3_TRIPLE_CLICKED 16384
BUTTON4_CLICKED 131072
BUTTON4_DOUBLE_CLICKED 262144
BUTTON4_PRESSED 65536
BUTTON4_RELEASED 32768
BUTTON4_TRIPLE_CLICKED 524288
BUTTON5_CLICKED 4194304
BUTTON5_DOUBLE_CLICKED 8388608
BUTTON5_PRESSED 2097152
BUTTON5_RELEASED 1048576
BUTTON5_TRIPLE_CLICKED 16777216
BUTTON_ALT 134217728
BUTTON_CTRL 33554432
BUTTON_SHIFT 67108864
COLOR_BLACK 0
COLOR_BLUE 4
COLOR_CYAN 6
COLOR_GREEN 2
COLOR_MAGENTA 5
COLOR_RED 1
COLOR_WHITE 7
COLOR_YELLOW 3
ERR -1
KEY_A1 348
KEY_A3 349
KEY_B2 350
KEY_BACKSPACE 263
KEY_BEG 354
KEY_BREAK 257
KEY_BTAB 353
KEY_C1 351
KEY_C3 352
KEY_CANCEL 355
KEY_CATAB 342
KEY_CLEAR 333
KEY_CLOSE 356
KEY_COMMAND 357
KEY_COPY 358
KEY_CREATE 359
KEY_CTAB 341
KEY_DC 330
KEY_DL 328
KEY_DOWN 258
KEY_EIC 332
KEY_END 360
KEY_ENTER 343
KEY_EOL 335
KEY_EOS 334
KEY_EXIT 361
KEY_F0 264
KEY_F1 265
KEY_F10 274
KEY_F11 275
KEY_F12 276
KEY_F13 277
KEY_F14 278
KEY_F15 279
KEY_F16 280
KEY_F17 281
KEY_F18 282
KEY_F19 283
KEY_F2 266
KEY_F20 284
KEY_F21 285
KEY_F22 286
KEY_F23 287
KEY_F24 288
KEY_F25 289
KEY_F26 290
KEY_F27 291
KEY_F28 292
KEY_F29 293
KEY_F3 267
KEY_F30 294
KEY_F31 295
KEY_F32 296
KEY_F33 297
KEY_F34 298
KEY_F35 299
KEY_F36 300
KEY_F37 301
KEY_F38 302
KEY_F39 303
KEY_F4 268
KEY_F40 304
KEY_F41 305
KEY_F42 306
KEY_F43 307
KEY_F44 308
KEY_F45 309
KEY_F46 310
KEY_F47 311
KEY_F48 312
KEY_F49 313
KEY_F5 269
KEY_F50 314
KEY_F51 315
KEY_F52 316
KEY_F53 317
KEY_F54 318
KEY_F55 319
KEY_F56 320
KEY_F57 321
KEY_F58 322
KEY_F59 323
KEY_F6 270
KEY_F60 324
KEY_F61 325
KEY_F62 326
KEY_F63 327
KEY_F7 271
KEY_F8 272
KEY_F9 273
KEY_FIND 362
KEY_HELP 363
KEY_HOME 262
KEY_IC 331
KEY_IL 329
KEY_LEFT 260
KEY_LL 347
KEY_MARK 364
KEY_MAX 511
KEY_MESSAGE 365
KEY_MIN 257
KEY_MOUSE 409
KEY_MOVE 366
KEY_NEXT 367
KEY_NPAGE 338
KEY_OPEN 368
KEY_OPTIONS 369
KEY_PPAGE 339
KEY_PREVIOUS 370
KEY_PRINT 346
KEY_REDO 371
KEY_REFERENCE 372
KEY_REFRESH 373
KEY_REPLACE 374
KEY_RESET 345
KEY_RESIZE 410
KEY_RESTART 375
KEY_RESUME 376
KEY_RIGHT 261
KEY_SAVE 377
KEY_SBEG 378
KEY_SCANCEL 379
KEY_SCOMMAND 380
KEY_SCOPY 381
KEY_SCREATE 382
KEY_SDC 383
KEY_SDL 384
KEY_SELECT 385
KEY_SEND 386
KEY_SEOL 387
KEY_SEXIT 388
KEY_SF 336
KEY_SFIND 389
KEY_SHELP 390
KEY_SHOME 391
KEY_SIC 392
KEY_SLEFT 393
KEY_SMESSAGE 394
KEY_SMOVE 395
KEY_SNEXT 396
KEY_SOPTIONS 397
KEY_SPREVIOUS 398
KEY_SPRINT 399
KEY_SR 337
KEY_SREDO 400
KEY_SREPLACE 401
KEY_SRESET 344
KEY_SRIGHT 402
KEY_SRSUME 403
KEY_SSAVE 404
KEY_SSUSPEND 405
KEY_STAB 340
KEY_SUNDO 406
KEY_SUSPEND 407
KEY_UNDO 408
KEY_UP 259
ncurses_version curses.ncurses_version(major=6, minor=4, patch=20230114)
OK 0
REPORT_MOUSE_POSITION 268435456
version b'2.2'