"curses" --- 문자 셀 디스플레이를 위한 터미널 처리
**************************************************

**소스 코드:** Lib/curses

======================================================================

The "curses" module provides an interface to the curses library, the
de-facto standard for portable advanced terminal handling.

curses는 유닉스 환경에서 가장 널리 사용되지만, 윈도우, DOS 및 기타 시
스템에서도 사용할 수 있는 버전이 있습니다. 이 확장 모듈은 리눅스와 유
닉스의 BSD 변형에서 동작하는 오픈 소스 curses 라이브러리인 ncurses의
API와 일치하도록 설계되었습니다.

가용성: not Android, not iOS, not WASI.

이 모듈은 모바일 플랫폼이나 웹어셈블리 플랫폼에서 지원되지 않습니다.

This is an *optional module*. If it is missing from your copy of
CPython, look for documentation from your distributor (that is,
whoever provided Python to you). If you are the distributor, see
Requirements for optional modules.

가용성: Unix.

참고:

  Whenever the documentation mentions a *character* it can be
  specified as an integer, a one-character Unicode string or a one-
  byte byte string. An integer is the code of a single encoded byte,
  optionally combined with attributes and a color pair, as returned by
  "window.inch()".설명서에 *문자 문자열(character string)*이 언급될 때
  마다 유니코드 문자열이나 바이트열로 지정할 수 있습니다.

참고:

  Whether curses may be used from several threads depends on the
  underlying library and how it was built. In many implementations,
  including the default build of ncurses, the screen state is shared
  and not thread-safe; since the blocking and refresh methods (such as
  "getch()" and "refresh()") release the *GIL*, unsynchronized use
  from several threads can then crash the interpreter. Serialize the
  calls.

더 보기:

  모듈 "curses.ascii"
     로케일 설정과 관계없이, ASCII 문자로 작업하기 위한 유틸리티.

  모듈 "curses.panel"
     curses 창에 깊이를 추가하는 패널 스택 확장.

  모듈 "curses.textpad"
     **Emacs**와 유사한 바인딩을 지원하는 curses를 위한 편집 가능한 텍
     스트 위젯.

  파이썬 curses 프로그래밍
     Andrew Kuchling과 Eric Raymond가 작성한, curses를 파이썬에서 사용
     하는 것에 대한 자습서 자료.


함수
====

The module "curses" defines the following exception:

exception curses.error

   curses 라이브러리 함수가 에러를 반환할 때 발생하는 예외.

참고:

  함수나 메서드에 대한 *x*나 *y* 인자가 선택 사항일 때마다, 기본값은
  현재 커서 위치입니다. *attr*이 선택적일 때마다 기본값은 "A_NORMAL"입
  니다.

The module "curses" defines the following functions:

curses.assume_default_colors(fg, bg, /)

   Allow use of default values for colors on terminals supporting this
   feature. Use this to support transparency in your application.

   * Assign terminal default foreground/background colors to color
     number "-1". So "init_pair(x, COLOR_RED, -1)" will initialize
     pair *x* as red on default background and "init_pair(x, -1,
     COLOR_BLUE)" will initialize pair *x* as default foreground on
     blue.

   * Change the definition of the color-pair "0" to "(fg, bg)".

   This is an ncurses extension.

   Added in version 3.14.

curses.baudrate()

   터미널의 출력 속도를 초당 비트 수로 반환합니다. 소프트웨어 터미널
   에뮬레이터에서는 고정된 큰 값을 갖습니다. 역사적인 이유로 포함되었
   습니다; 이전에는, 시간 지연에 대한 출력 루프를 작성하는데, 때로는
   회선 속도에 따라 인터페이스를 변경하는 데 사용되었습니다.

curses.beep()

   짧은 주의 음을 냅니다.

curses.can_change_color()

   프로그래머가 터미널에 표시되는 색상을 변경할 수 있는지에 따라
   "True"나 "False"를 반환합니다.

curses.cbreak()

   cbreak 모드로 들어갑니다. cbreak 모드("드문(rare)" 모드라고도 합니
   다)에서는 일반 tty 줄 버퍼링이 꺼지고 문자를 하나씩 읽을 수 있습니
   다. 그러나, 원시(raw) 모드와 달리, 특수 문자(인터럽트(interrupt),
   종료(quit), 일시 중단(suspend) 및 흐름 제어(flow control))는 tty 드
   라이버와 호출하는 프로그램에 영향을 미칩니다. "raw()"를 먼저 호출한
   다음 "cbreak()"를 호출하면 터미널이 cbreak 모드로 유지됩니다.

curses.color_content(color_number)

   Return the intensity of the red, green, and blue (RGB) components
   in the color *color_number*, which must be between "0" and "COLORS
   - 1".  Return a 3-tuple, containing the R,G,B values for the given
   color, which will be between "0" (no component) and "1000" (maximum
   amount of component).  Raise an exception if the color is not
   supported.

curses.color_pair(pair_number)

   지정된 색상 쌍으로 텍스트를 표시하기 위한 속성값을 반환합니다. 처음
   256 색상 쌍만 지원됩니다. 이 속성값은 "A_STANDOUT", "A_REVERSE" 및
   기타 "A_*" 속성과 결합할 수 있습니다. "pair_number()"는 이 함수의
   역입니다.

curses.curs_set(visibility)

   커서 상태를 설정합니다. *visibility*는 "0", "1" 또는 "2"로 설정될
   수 있는데, 각각 보이지 않음(invisible), 보통, 매우 잘 보임(very
   visible)입니다. 터미널이 요청된 visibility를 지원하면, 이전 커서 상
   태를 반환합니다; 그렇지 않으면 예외가 발생합니다. 많은 터미널에서,
   "보이는(visible)" 모드는 밑줄 커서이고 "매우 잘 보이는(very
   visible)" 모드는 블록 커서입니다.

curses.def_prog_mode()

   현재 터미널 모드를 "프로그램(program)" 모드로 저장합니다. 프로그램
   모드는 실행 중인 프로그램이 curses를 사용 중인 모드입니다. (반대는
   "셸(shell)" 모드이며, 프로그램이 curses를 사용하지 않을 때입니다.)
   이후에 "reset_prog_mode()"를 호출하면 이 모드가 복원됩니다.

curses.def_shell_mode()

   현재 터미널 모드를 "셸(shell)" 모드로 저장합니다. 셸 모드는 실행 중
   인 프로그램이 curses를 사용하지 않는 모드입니다. (반대는 "프로그램
   (program)" 모드이며, 프로그램이 curses 기능을 사용 중일 때입니다.)
   이후에 "reset_shell_mode()"를 호출하면 이 모드가 복원됩니다.

curses.delay_output(ms)

   출력에 *ms* 밀리초 일시 중지를 삽입합니다.

curses.doupdate()

   Update the physical screen.  The curses library keeps two data
   structures, one representing the current physical screen contents
   and a virtual screen representing the desired next state.  The
   "doupdate()" function updates the physical screen to match the
   virtual screen.

   가상 화면은 창에 "addstr()"과 같은 쓰기 연산이 수행된 후
   "noutrefresh()" 호출로 갱신될 수 있습니다. 일반적인 "refresh()" 호
   출은 단순히 "noutrefresh()" 후에 "doupdate()" 하는 것입니다; 여러
   개의 창을 갱신해야 하면, 모든 창에서 "noutrefresh()" 호출을 실행한
   다음 단일 "doupdate()"를 실행하여 속도 성능을 높이고 아마도 화면 깜
   박임을 줄일 수 있습니다.

curses.echo()

   반향(echo) 모드로 들어갑니다. 반향 모드에서는, 각 문자 입력이 입력
   되는 대로 화면에 반향을 일으킵니다.

curses.endwin()

   라이브러리를 초기화 해제하고, 터미널을 정상 상태로 되돌립니다.

curses.erasechar()

   사용자의 현재 지우기 문자(erase character)를 1바이트 바이트열 객체
   로 반환합니다. 유닉스 운영 체제에서 이는 curses 프로그램의 제어 tty
   의 특성이며, curses 라이브러리 자체에 의해 설정되지 않습니다.

curses.filter()

   The "filter()" routine, if used, must be called before "initscr()"
   is called.  The effect is that, during the initialization, "LINES"
   is set to "1"; the capabilities "clear", "cup", "cud", "cud1",
   "cuu1", "cuu", "vpa" are disabled; and the "home" string is set to
   the value of "cr". The effect is that the cursor is confined to the
   current line, and so are screen updates.  This may be used for
   enabling character-at-a-time  line editing without touching the
   rest of the screen.

curses.flash()

   화면을 깜박입니다. 즉, 반전 비디오로 변경한 다음 짧은 간격으로 되돌
   립니다. 어떤 사람들은 "beep()"이 만드는 가청 주의 신호보다 이런 '시
   각적 벨'을 선호합니다.

curses.flushinp()

   모든 입력 버퍼를 플러시 합니다. 이렇게 하면 사용자가 입력했지만, 아
   직 프로그램에서 처리하지 않은 모든 선행 입력(typeahead)을 모두 버립
   니다.

curses.getmouse()

   "getch()"가 "KEY_MOUSE"를 반환하여 마우스 이벤트를 알린 후, 이 메서
   드는 대기 중인 마우스 이벤트를 꺼내기 위해 호출되어야 합니다, 이벤
   트는 5-튜플 "(id, x, y, z, bstate)"로 표현됩니다. *id*는 여러 장치
   를 구별하는 데 사용되는 ID 값이며, *x*, *y*, *z*는 이벤트 좌표입니
   다. (*z*는 현재 사용되지 않습니다.) *bstate*는 비트가 이벤트 유형을
   나타내도록 설정되는 정숫값이며, 다음 상수 중 하나 이상의 비트별 OR
   입니다. 여기서 *n*은 1에서 5까지의 버튼 번호입니다:
   "BUTTONn_PRESSED", "BUTTONn_RELEASED", "BUTTONn_CLICKED",
   "BUTTONn_DOUBLE_CLICKED", "BUTTONn_TRIPLE_CLICKED", "BUTTON_SHIFT",
   "BUTTON_CTRL", "BUTTON_ALT".

   버전 3.10에서 변경: The "BUTTON5_*" constants are now exposed if
   they are provided by the underlying curses library.

curses.getsyx()

   가상 화면 커서의 현재 좌표를 튜플 "(y, x)"로 반환합니다. "leaveok"
   가 현재 "True"이면, "(-1, -1)"을 반환합니다.

curses.getwin(file)

   Read window-related data stored in the file by an earlier
   "window.putwin()" call. The routine then creates and initializes a
   new window using that data, returning the new window object.  The
   *file* argument must be a file object opened for reading in binary
   mode.

curses.has_colors()

   터미널이 색상을 표시할 수 있으면 "True"를 반환합니다. 그렇지 않으면
   "False"를 반환합니다.

curses.has_extended_color_support()

   Return "True" if the module supports extended colors; otherwise,
   return "False". Extended color support allows more than 256 color
   pairs for terminals that support more than 16 colors (for example,
   xterm-256color).

   Extended color support requires ncurses version 6.1 or later.

   Added in version 3.10.

curses.has_ic()

   터미널에 문자 삽입과 삭제 기능이 있으면 "True"를 반환합니다. 이 함
   수는 역사적인 이유로만 포함되는데, 모든 최신 소프트웨어 터미널 에뮬
   레이터에 이러한 기능이 있기 때문입니다.

curses.has_il()

   터미널에 줄 삽입과 삭제 기능이 있거나, 영역 스크롤을 사용하여 시뮬
   레이션 할 수 있으면 "True"를 반환합니다. 이 함수는 역사적인 이유로
   만 포함되는데, 모든 최신 소프트웨어 터미널 에뮬레이터에 이러한 기능
   이 있기 때문입니다.

curses.has_key(ch)

   키값 *ch*를 취하고, 현재 터미널 유형이 해당 값을 가진 키를 인식하면
   "True"를 반환합니다.

curses.halfdelay(tenths)

   사용자가 입력 한 문자를 프로그램에서 즉시 사용할 수 있다는 점에서
   cbreak 모드와 유사한, 반 지연(half-delay) 모드에 사용됩니다. 그러나
   *tenths* 10분의 1초 동안 블록한 후 아무것도 입력하지 않으면 예외가
   발생합니다. *tenths*의 값은 "1"과 "255" 사이의 숫자여야 합니다. 반
   지연 모드를 종료하려면 "nocbreak()"를 사용하십시오.

curses.init_color(color_number, r, g, b)

   변경될 색상 번호와 뒤따르는 세 RGB 값(빨강, 녹색 및 파랑 성분의 양)
   을 취해서 색상의 정의를 변경합니다. *color_number*의 값은 "0"과
   "COLORS - 1" 사이여야 합니다. *r*, *g*, *b*는 각각 "0"과 "1000" 사
   이의 값이어야 합니다. "init_color()"를 사용하면, 화면에서 해당 색상
   의 모든 항목이 즉시 새 정의로 변경됩니다. 이 함수는 대부분의 터미널
   에서 효과가 없습니다; "can_change_color()"가 "True"를 반환할 때만
   활성화됩니다.

curses.init_pair(pair_number, fg, bg)

   Change the definition of a color-pair.  It takes three arguments:
   the number of the color-pair to be changed, the foreground color
   number, and the background color number.  The value of
   *pair_number* must be between "1" and "COLOR_PAIRS - 1" (the "0"
   color pair can only be changed by "use_default_colors()" and
   "assume_default_colors()"). The value of *fg* and *bg* arguments
   must be between "0" and "COLORS - 1", or, after calling
   "use_default_colors()" or "assume_default_colors()", "-1". If the
   color-pair was previously initialized, the screen is refreshed and
   all occurrences of that color-pair are changed to the new
   definition.

curses.initscr()

   라이브러리를 초기화합니다. 전체 화면을 나타내는 창 객체를 반환합니
   다.

   See "setupterm()" for a caveat about calling it before this
   function.

   참고:

     터미널을 여는 중 에러가 발생하면, 하부 curses 라이브러리가 인터프
     리터를 종료시킬 수 있습니다.

curses.intrflush(flag)

   If *flag* is "True", pressing an interrupt key (interrupt, break,
   or quit) will flush all output in the terminal driver queue.  If
   *flag* is "False", no flushing is done.

curses.is_term_resized(nlines, ncols)

   "resize_term()"이 창 구조를 수정한다면 "True"를, 그렇지 않으면
   "False"를 반환합니다.

curses.isendwin()

   "endwin()"이 호출되었으면 (즉, curses 라이브러리가 초기화 해제되었
   다면) "True"를 반환합니다.

curses.keyname(k)

   키 번호 *k*의 이름을 바이트열 객체로 반환합니다. 인쇄 가능한 ASCII
   문자를 생성하는 키의 이름은 키의 문자입니다. 제어 키(control-key)
   조합의 이름은 캐럿("b'^'")과 그 뒤에오는 해당 인쇄 가능한 ASCII 문
   자로 구성된 2바이트 바이트열 객체입니다. 대체 키(alt-key) 조합(128
   --255)의 이름은 접두사 "b'M-'"와 그 뒤에 오는 해당 ASCII 문자의 이
   름으로 구성되는 바이트열 객체입니다.

   Raise a "ValueError" if *k* is negative.

curses.killchar()

   사용자의 현재 줄 삭제 문자(line kill character)를 1바이트 바이트열
   객체로 반환합니다. 유닉스 운영 체제에서 이는 curses 프로그램의 제어
   tty의 특성이며, curses 라이브러리 자체에 의해 설정되지 않습니다.

curses.longname()

   현재 터미널을 설명하는 terminfo 긴 이름 필드를 포함하는 바이트열 객
   체를 반환합니다. 자세한 설명의 최대 길이는 128자입니다. "initscr()"
   을 호출한 후에만 정의됩니다.

curses.meta(flag)

   *flag*가 "True"이면, 8비트 문자 입력을 허용합니다. *flag*가 "False"
   이면 7비트 문자만 허용합니다.

curses.mouseinterval(interval)

   Set the maximum time in milliseconds that can elapse between press
   and release events in order for them to be recognized as a click,
   and return the previous interval value.  The default value is 166
   milliseconds, or one sixth of a second. Use a negative *interval*
   to obtain the interval value without changing it.

curses.mousemask(mousemask)

   Set the mouse events to be reported, and return a tuple
   "(availmask, oldmask)".   *availmask* indicates which of the
   specified mouse events can be reported; on complete failure it
   returns "0".  *oldmask* is the previous value of the mouse event
   mask.  If this function is never called, no mouse events are ever
   reported.

curses.napms(ms)

   *ms* 밀리초 동안 휴면합니다.

curses.newpad(nlines, ncols)

   주어진 수의 행과 열로 새로운 패드 데이터 구조에 대한 포인터를 만들
   고 반환합니다. 패드를 창 객체로 반환합니다.

   A pad is like a window, except that it is not restricted by the
   screen size, and is not necessarily associated with a particular
   part of the screen.  Pads can be used when a large window is
   needed, and only a part of the window will be on the screen at one
   time.  Automatic refreshes of pads (such as from scrolling or
   echoing of input) do not occur.  The "refresh()" and
   "noutrefresh()" methods of a pad require 6 arguments to specify the
   part of the pad to be displayed and the location on the screen to
   be used for the display. The arguments are *pminrow*, *pmincol*,
   *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* arguments refer
   to the upper-left corner of the pad region to be displayed and the
   *s* arguments define a clipping box on the screen within which the
   pad region is to be displayed.

curses.newwin(nlines, ncols)
curses.newwin(nlines, ncols, begin_y, begin_x)

   왼쪽 위 모서리가 "(begin_y, begin_x)"이고, 높이/너비가
   *nlines*/*ncols* 인 새 창을 반환합니다.

   기본적으로, 창은 지정된 위치에서 화면 오른쪽 하단으로 확장됩니다.

curses.nl(flag=True)

   줄 바꿈(newline) 모드로 들어갑니다. 이 모드는 입력에서 리턴 키를 줄
   바꿈으로 변환하고, 출력에서 줄 바꿈을 리턴(return)과 줄 넘김(line-
   feed)으로 변환합니다. 줄 바꿈 모드는 처음에 켜져 있습니다.

   If *flag* is "False", the effect is the same as calling "nonl()".

curses.nocbreak()

   cbreak 모드를 종료합니다. 줄 버퍼링을 사용하는 일반 "요리된
   (cooked)" 모드로 돌아갑니다.

curses.noecho()

   반향 모드를 종료합니다. 입력 문자 반향이 꺼집니다.

curses.nonl()

   줄 바꿈 모드를 종료합니다. 입력에서 리턴을 줄 바꿈으로 변환하는 것
   을 비활성화하고, 출력에서 줄 바꿈을 줄 바꿈/리턴으로 저수준 변환하
   는 것을 비활성화합니다 (그러나 이것은 "addch('\n')"의 동작을 변경하
   지는 않는데, 항상 가상 화면에서 리턴(return)과 줄 넘김(line feed)에
   동등한 역할을 합니다). 변환이 꺼져 있으면, curses가 때로 수직 동작
   속도를 약간 올릴 수 있습니다; 또한, 입력에서 리턴 키를 감지할 수 있
   습니다.

curses.noqiflush()

   "noqiflush()" 루틴이 사용되면, "INTR", "QUIT" 및 "SUSP" 문자와 연관
   된 입력과 출력 큐의 일반 플러시가 수행되지 않습니다. 처리기가 종료
   한 후, 인터럽트가 발생하지 않은 것처럼 출력을 계속하려면 시그널 처
   리기에서 "noqiflush()"를 호출할 수 있습니다.

curses.noraw()

   원시(raw) 모드를 종료합니다. 줄 버퍼링을 사용하는 일반 "요리된
   (cooked)" 모드로 돌아갑니다.

curses.pair_content(pair_number)

   요청된 색상 쌍의 색상이 포함된 튜플 "(fg, bg)"를 반환합니다.
   *pair_number*의 값은 "0"과 "COLOR_PAIRS - 1" 사이여야 합니다.

curses.pair_number(attr)

   속성값 *attr*로 설정된 색상 쌍의 번호를 반환합니다. "color_pair()"
   는 이 함수의 역입니다.

curses.putp(str)

   Equivalent to "tputs(str, 1, putchar)"; emit the value of a
   specified terminfo capability, a bytes object, for the current
   terminal. Note that the output of "putp()" always goes to standard
   output.

   "setupterm()" (or "initscr()") must be called first.

curses.qiflush([flag])

   *flag*가 "False"이면, 효과는 "noqiflush()"를 호출하는 것과 같습니다
   . *flag*가 "True"이거나, 인자가 제공되지 않으면, 이러한 제어 문자를
   읽을 때 큐가 플러시 됩니다.

curses.raw()

   원시(raw) 모드로 들어갑니다. 원시 모드에서는, 일반 줄 버퍼링과 인터
   럽트, 종료, 일시 중단 및 흐름 제어 키 처리가 꺼집니다; curses 입력
   함수로 문자가 한 번에 하나씩 제시됩니다.

curses.reset_prog_mode()

   "def_prog_mode()"로 이전에 저장한 대로, 터미널을 "프로그램
   (program)" 모드로 복원합니다.

curses.reset_shell_mode()

   "def_shell_mode()"로 이전에 저장한 대로, 터미널을 "셸(shell)" 모드
   로 복원합니다.

curses.resetty()

   터미널 모드의 상태를 "savetty()"에 대한 마지막 호출 때의 상태로 복
   원합니다.

curses.resize_term(nlines, ncols)

   "resizeterm()"이 사용하는 백 엔드 함수로, 대부분의 작업을 수행합니
   다; 창 크기를 조정할 때, "resize_term()"은 확장되는 영역을 공백으로
   채웁니다. 호출하는 응용 프로그램은 이러한 영역을 적절한 데이터로 채
   워야 합니다. "resize_term()" 함수는 모든 창의 크기를 조정하려고 합
   니다. 그러나, 패드의 호출 규칙으로 인해, 응용 프로그램과의 추가 상
   호 작용 없이 이들의 크기를 조정할 수 없습니다.

curses.resizeterm(nlines, ncols)

   표준과 현재 창의 크기를 지정된 크기로 조정하고, 창 크기를 기록하는
   curses 라이브러리에서 사용하는 다른 관리 데이터를 조정합니다 (특히
   SIGWINCH 처리기).

curses.savetty()

   터미널 모드의 현재 상태를 "resetty()"에서 사용 가능한 버퍼에 저장합
   니다.

curses.get_escdelay()

   "set_escdelay()"로 설정된 값을 가져옵니다.

   Added in version 3.9.

curses.set_escdelay(ms)

   키보드에 입력된 개별 이스케이프 문자와 커서와 기능키로 전송된 이스
   케이프 시퀀스를 구별하기 위해, 이스케이프 문자를 읽은 후 기다릴 밀
   리초 수를 설정합니다.

   Added in version 3.9.

curses.get_tabsize()

   "set_tabsize()"로 설정된 값을 가져옵니다.

   Added in version 3.9.

curses.set_tabsize(size)

   탭을 창에 추가해서 탭 문자를 스페이스로 변환할 때 curses 라이브러리
   가 사용하는 열 수를 설정합니다.

   Added in version 3.9.

curses.setsyx(y, x)

   가상 화면 커서를 *y*, *x*로 설정합니다. *y*와 *x*가 모두 "-1"이면,
   "leaveok"는 "True"로 설정됩니다.

curses.setupterm(term=None, fd=-1)

   터미널을 초기화합니다. *term*은 터미널 이름을 제공하는 문자열이거나
   "None"입니다; 생략되거나 "None"이면, "TERM" 환경 변수의 값이 사용됩
   니다. *fd*는 초기화 시퀀스가 전송될 파일 기술자입니다; 제공되지 않
   거나 "-1"이면, "sys.stdout"의 파일 기술자가 사용됩니다.

   Raise a "curses.error" if the terminal could not be found or its
   terminfo database entry could not be read.  If the terminal has
   already been initialized, this function has no effect.

   참고:

     Calling "initscr()" after "setupterm()" leaks the terminal that
     "setupterm()" allocated: the curses library keeps only a single
     current terminal and does not free the previously allocated one.

curses.start_color()

   프로그래머가 색상을 사용하려면, 다른 색상 조작 루틴을 호출하기 전에
   호출해야 합니다. "initscr()" 직후 이 루틴을 호출하는 것이 좋습니다.

   "start_color()" initializes eight basic colors (black, red,  green,
   yellow, blue, magenta, cyan, and white), and two global variables
   in the "curses" module, "COLORS" and "COLOR_PAIRS", containing the
   maximum number of colors and color-pairs the terminal can support.
   It also restores the colors on the terminal to the values they had
   when the terminal was just turned on.

curses.termattrs()

   터미널이 지원하는 모든 비디오 속성의 논리적 OR를 반환합니다. 이 정
   보는 curses 프로그램이 화면 모양을 완전히 제어해야 할 때 유용합니다
   .

curses.termname()

   환경 변수 "TERM"의 값을 14자로 잘린 바이트열 객체로 반환합니다.

curses.tigetflag(capname)

   terminfo 기능 이름 *capname*에 해당하는 불리언 기능의 값을 정수로
   반환합니다. *capname*이 불리언 기능이 아니면 "-1" 값을, 터미널 설명
   에서 취소되었거나 빠졌으면 "0"을 반환합니다.

   "setupterm()" (or "initscr()") must be called first.

curses.tigetnum(capname)

   terminfo 기능 이름 *capname*에 해당하는 숫자 기능의 값을 정수로 반
   환합니다. *capname*이 숫자 기능이 아니면 "-2" 값을, 터미널 설명에서
   취소되었거나 빠졌으면 "-1"을 반환합니다.

   "setupterm()" (or "initscr()") must be called first.

curses.tigetstr(capname)

   terminfo 기능 이름 *capname*에 해당하는 문자열 기능의 값을 바이트열
   객체로 반환합니다. *capname*이 terminfo "문자열 기능"이 아니거나,
   터미널 설명에서 취소되었거나 빠졌으면 "None"을 반환합니다.

   "setupterm()" (or "initscr()") must be called first.

curses.tparm(str[, ...])

   Instantiate the bytes object *str* with the supplied parameters,
   where *str* should be a parameterized byte string obtained from the
   terminfo database.  For example, "tparm(tigetstr("cup"), 5, 3)"
   could result in "b'\033[6;4H'", the exact result depending on
   terminal type.  Up to nine integer parameters may be supplied.

   "setupterm()" (or "initscr()") must be called first.

curses.typeahead(fd)

   파일 기술자 *fd*가 선행 입력 검사(typeahead checking)에 사용되도록
   지정합니다. *fd*가 "-1"이면, 선행 입력 검사가 수행되지 않습니다.

   curses 라이브러리는 화면을 갱신하는 동안 정기적으로 선행 입력을 들
   여다보고 "라인 브레이크 아웃 최적화(line-breakout optimization)"를
   수행합니다. 입력이 발견되고, 그것이 tty에서 왔으면, refresh나
   doupdate가 다시 호출될 때까지 현재 갱신을 연기해서, 앞서 입력된 명
   령에 더 빠르게 응답 할 수 있도록 합니다. 이 함수를 사용하면 선행 입
   력 검사를 위해 다른 파일 기술자를 지정할 수 있습니다.

curses.unctrl(ch)

   Return a bytes object which is a printable representation of the
   character *ch*; any attributes and color pair are ignored. Control
   characters are represented as a caret followed by the character,
   for example as "b'^C'". Printing characters are left as they are.

curses.ungetch(ch)

   다음 "getch()"가 반환하도록 *ch*를 푸시합니다.

   *ch* may be an integer (a key code or the code of an encoded byte),
   a byte, or a string of length 1 which encodes to a single byte.

   참고:

     "getch()"가 호출되기 전에 하나의 *ch* 만 푸시할 수 있습니다.

curses.update_lines_cols()

   "LINES"와 "COLS" 모듈 변수를 갱신합니다. 수동 화면 크기 조정을 감지
   하는 데 유용합니다.

   Added in version 3.5.

curses.unget_wch(ch)

   다음 "get_wch()"가 반환하도록 *ch*를 푸시합니다.

   *ch* may be an integer (a character code, not a key code) or a
   string of length 1.

   참고:

     "get_wch()"가 호출되기 전에 하나의 *ch* 만 푸시할 수 있습니다.

   Added in version 3.3.

curses.ungetmouse(id, x, y, z, bstate)

   주어진 상태 데이터와 결합하여, "KEY_MOUSE" 이벤트를 입력 큐로 푸시
   합니다.

curses.use_env(flag)

   사용되면, 이 함수는 "initscr()"이나 newterm을 호출하기 전에 호출해
   야 합니다. *flag*가 "False"이면, 환경 변수 "LINES"와 "COLUMNS"(기본
   적으로 사용됩니다)가 설정되어 있거나, 창에서 curses가 실행 중인 경
   우(이때 기본 동작은 "LINES"와 "COLUMNS"가 설정되지 않았으면 창 크기
   를 사용하는 것입니다)에도 terminfo 데이터베이스에 지정된 행(lines)
   과 열(columns)의 값이 사용됩니다.

curses.use_default_colors()

   Equivalent to "assume_default_colors(-1, -1)".

curses.wrapper(func, /, *args, **kwargs)

   curses를 초기화하고 다른 콜러블 객체 *func*를 호출하는데, 이 콜러블
   은 curses를 사용하는 응용 프로그램의 나머지 부분이어야 합니다. 응용
   프로그램에서 예외가 발생하면, 이 함수는 예외를 다시 발생시키고 트레
   이스백을 생성하기 전에 터미널을 정상 상태로 복원합니다. 콜러블 객체
   *func*는 메인 창 'stdscr'을 첫 번째 인자로 전달받고 "wrapper()"로
   전달된 다른 모든 인자가 그 뒤를 따릅니다. *func*를 호출하기 전에,
   "wrapper()"는 cbreak 모드를 켜고, 반향을 끄고, 터미널 키패드를 활성
   화하고, 터미널에 색상이 지원되면 색상을 초기화합니다. 빠져나갈 때 (
   정상인지 예외로 인한 것인지 관계없이) 요리된(cooked) 모드를 복원하
   고, 반향을 켜고, 터미널 키패드를 비활성화합니다.


Window objects
==============

class curses.window

   위의 "initscr()"과 "newwin()"에 의해 반환된 창 객체에는 다음과 같은
   메서드와 어트리뷰트가 있습니다:

window.addch(ch[, attr])
window.addch(y, x, ch[, attr])

   속성 *attr*로 "(y, x)"에 문자 *ch*를 그려서, 그 위치에 이전에 그린
   문자를 덮어씁니다. 기본적으로, 문자 위치와 속성은 창 객체의 현재 설
   정입니다.

   참고:

     Writing outside the window, subwindow, or pad raises a
     "curses.error". Attempting to write to the lower-right corner of
     a window, subwindow, or pad will cause an exception to be raised
     after the character is printed.

window.addnstr(str, n[, attr])
window.addnstr(y, x, str, n[, attr])

   "(y, x)"에 문자열 *str*의 최대 *n* 문자를 속성 *attr*로 그려, 이전
   디스플레이의 내용을 덮어씁니다.

window.addstr(str[, attr])
window.addstr(y, x, str[, attr])

   "(y, x)"에 문자열 *str*을 속성 *attr*로 그려, 이전 디스플레이의 내
   용을 덮어씁니다.

   참고:

     * Writing outside the window, subwindow, or pad raises
       "curses.error". Attempting to write to the lower-right corner
       of a window, subwindow, or pad will cause an exception to be
       raised after the string is printed.

     * A bug in ncurses, the backend for this Python module, could
       cause segfaults when resizing windows.  This was fixed in
       ncurses-6.1-20190511. If you are stuck with an earlier ncurses,
       you can avoid triggering it by not calling "addstr()" with a
       *str* that has embedded newlines; instead, call "addstr()"
       separately for each line.

window.attroff(attr)

   현재 창에 대한 모든 쓰기에 적용된 "배경(background)" 집합에서 속성
   *attr*을 제거합니다.

window.attron(attr)

   Add attribute *attr* to the "background" set applied to all writes
   to the current window.

window.attrset(attr)

   속성의 "배경(background)" 집합을 *attr*로 설정합니다. 이 집합은 처
   음에 "0"입니다 (속성 없음).

window.bkgd(ch[, attr])

   창의 배경 속성을 *attr* 속성을 가진 문자 *ch*로 설정합니다. 그런 다
   음 해당 창의 모든 문자 위치에 변경 사항이 적용됩니다:

   * 창의 모든 문자 속성이 새 배경 속성으로 변경됩니다.

   * 이전 배경 문자가 나타날 때마다, 새 배경 문자로 변경됩니다.

window.bkgdset(ch[, attr])

   창의 배경을 설정합니다. 창의 배경은 문자와 속성의 모든 조합으로 구
   성됩니다. 배경의 속성 부분은 창에 쓰인 모든 비 공백 문자와 결합(OR)
   합니다. 배경의 문자와 속성 부분은 모두 공백 문자와 결합합니다. 배경
   은 문자의 속성이 되고 스크롤과 줄/문자 삽입/삭제 연산을 통해 문자와
   함께 이동합니다.

window.border([ls[, rs[, ts[, bs[, tl[, tr[, bl[, br]]]]]]]])

   창의 가장자리 주위에 테두리를 그립니다. 각 매개 변수는 테두리의 특
   정 부분에 사용할 문자를 지정합니다; 자세한 내용은 아래 표를 참조하
   십시오.

   참고:

     모든 매개 변수의 "0" 값은 해당 매개 변수에 기본 문자가 사용되도록
     합니다. 키워드 매개 변수는 사용할 수 *없습니다*. 기본값은 이 표에
     나열되어 있습니다:

   +-------------+-----------------------+-------------------------+
   | 매개 변수   | 설명                  | 기본값                  |
   |=============|=======================|=========================|
   | *ls*        | 좌변                  | "ACS_VLINE"             |
   +-------------+-----------------------+-------------------------+
   | *rs*        | 우변                  | "ACS_VLINE"             |
   +-------------+-----------------------+-------------------------+
   | *ts*        | 상단                  | "ACS_HLINE"             |
   +-------------+-----------------------+-------------------------+
   | *bs*        | 하단                  | "ACS_HLINE"             |
   +-------------+-----------------------+-------------------------+
   | *tl*        | 왼쪽 위 모서리        | "ACS_ULCORNER"          |
   +-------------+-----------------------+-------------------------+
   | *tr*        | 오른쪽 위 모서리      | "ACS_URCORNER"          |
   +-------------+-----------------------+-------------------------+
   | *bl*        | 왼쪽 아래 모서리      | "ACS_LLCORNER"          |
   +-------------+-----------------------+-------------------------+
   | *br*        | 오른쪽 아래 모서리    | "ACS_LRCORNER"          |
   +-------------+-----------------------+-------------------------+

window.box([vertch, horch])

   "border()"와 유사하지만, *ls*와 *rs*가 모두 *vertch*이고 *ts*와
   *bs*가 모두 *horch*입니다. 이 함수는 항상 기본 모서리 문자를 사용합
   니다.

window.chgat(attr)
window.chgat(num, attr)
window.chgat(y, x, attr)
window.chgat(y, x, num, attr)

   현재 커서 위치나 제공되면 "(y, x)" 위치에 *num* 문자의 속성을 설정
   합니다. *num*이 제공되지 않거나 "-1"이면, 줄 끝까지의 모든 문자에
   속성이 설정됩니다. 이 함수는 제공되면 커서를 "(y, x)" 위치로 이동합
   니다. 변경된 줄을 "touchline()" 메서드를 사용하여 터치해서 다음 창
   refresh로 내용이 다시 표시됩니다.

window.clear()

   "erase()"와 유사하지만, "refresh()"를 다음에 호출할 때 전체 창이 다
   시 그려집니다.

window.clearok(flag)

   *flag*가 "True"이면, "refresh()"에 대한 다음 호출은 창을 완전히 지
   웁니다.

window.clrtobot()

   커서에서 창끝까지 지웁니다: 커서 아래의 모든 줄이 삭제된 다음,
   "clrtoeol()"과 동등한 것이 수행됩니다.

window.clrtoeol()

   커서에서 줄 끝까지 지웁니다.

window.cursyncup()

   창의 현재 커서 위치를 반영하도록 창의 모든 조상의 현재 커서 위치를
   갱신합니다.

window.delch([y, x])

   Delete the character under the cursor, or at "(y, x)" if specified.
   All characters to the right on the same line are shifted one
   position left.

window.deleteln()

   커서 아래의 줄을 삭제합니다. 다음 줄은 모두 한 줄씩 위로 이동합니다
   .

window.derwin(begin_y, begin_x)
window.derwin(nlines, ncols, begin_y, begin_x)

   "창 파생(derive window)"의 약어인 "derwin()"은 "subwin()"을 호출하
   는 것과 같지만, *begin_y*와 *begin_x*가 전체 화면에 상대적이 아니라
   창의 원점에 상대적이라는 차이가 있습니다. 파생된 창에 대한 창 객체
   를 반환합니다.

window.echochar(ch[, attr])

   *attr* 속성을 가진 문자 *ch*를 추가하고, 즉시 창에서 "refresh()"를
   호출합니다.

window.enclose(y, x)

   주어진 화면 상대적인 문자 셀 좌표 쌍이 주어진 창에 속하는지를 검사
   하고, "True"나 "False"를 반환합니다. 마우스 이벤트의 위치를 포함하
   는 화면 창의 부분 집합을 결정하는 데 유용합니다.

   버전 3.10에서 변경: Previously it returned "1" or "0" instead of
   "True" or "False".

window.encoding

   Encoding used to encode the string arguments of the methods and to
   decode their results on a build without wide-character support. The
   encoding attribute is inherited from the parent window when a
   subwindow is created, for example with "window.subwin()". By
   default, current locale encoding is used (see
   "locale.getencoding()").

   Added in version 3.3.

window.erase()

   창을 지웁니다.

window.getbegyx()

   왼쪽 위 모서리 좌표의 튜플 "(y, x)"를 반환합니다.

window.getbkgd()

   Return the given window's current background character/attribute
   pair. Its components can be extracted like those of "inch()".

window.getch([y, x])

   Read a key press, after moving the cursor to *y*, *x* if specified,
   and return it as an integer. The window is refreshed first if it is
   not a pad and was modified since the last refresh. Wait until a key
   is pressed, or return "-1" if the read is non-blocking or times out
   (see "nodelay()" and "timeout()").

   An ordinary key is returned as the code of a single byte of its
   encoding in the current locale, so a character encoded with several
   bytes takes several calls. For example, in a UTF-8 locale "'é'" is
   read as "195", then "169". Use "get_wch()" to read it as a single
   character.

   In keypad mode (see "keypad()") function keys and other special
   keys are returned as one of the KEY_* constants, which cannot be
   mistaken for an ordinary key. Otherwise, or if their escape
   sequence does not arrive in time (see "notimeout()" and
   "set_escdelay()"), their bytes are returned one at a time.

   In echo mode (see "echo()") the key is added to the window as by
   "addch()"; special keys are not echoed.

window.get_wch([y, x])

   Read a key press, after moving the cursor to *y*, *x* if specified,
   and return it as a one-character "str". The window is refreshed
   first if it is not a pad and was modified since the last refresh.
   Wait until a key is pressed, or raise "error" if the read is non-
   blocking or times out (see "nodelay()" and "timeout()").

   In keypad mode (see "keypad()") function keys and other special
   keys are returned as one of the KEY_* constants, an integer.
   Otherwise, or if their escape sequence does not arrive in time (see
   "notimeout()" and "set_escdelay()"), their characters are returned
   one at a time.

   In echo mode (see "echo()") the key is added to the window as by
   "addch()"; special keys are not echoed.

   Added in version 3.3.

window.getkey([y, x])

   Read a key press as "getch()" does, but return it as a "str": an
   ordinary key as a one-character string, the byte decoded as
   Latin-1, and a special key as its name, such as "'KEY_UP'" (see
   "keyname()"). Raise "error" instead of returning "-1" if there is
   no input.

window.getmaxyx()

   창의 높이와 너비의 튜플 "(y, x)"를 반환합니다.

window.getparyx()

   부모 창에 대해 상대적인 이 창의 시작 좌표를 튜플 "(y, x)"로 반환합
   니다. 이 창에 부모가 없으면 "(-1, -1)"을 반환합니다.

window.getstr()
window.getstr(n)
window.getstr(y, x)
window.getstr(y, x, n)

   Read a line of input from the user, with primitive line editing
   capacity, after moving the cursor to *y*, *x* if specified. Return
   it as a bytes object, in the encoding of the current locale and
   without the terminating newline. At most *n* bytes are read; *n*
   defaults to and cannot exceed 2047.

   버전 3.14에서 변경: The maximum value for *n* was increased from
   1023 to 2047.

window.getyx()

   창의 왼쪽 위 모서리에 상대적인 현재 커서 위치의 튜플 "(y, x)"를 반
   환합니다.

window.hline(ch, n[, attr])
window.hline(y, x, ch, n[, attr])

   Display a horizontal line starting at "(y, x)" with length *n*
   consisting of the character *ch* with attributes *attr*.  The line
   stops at the right edge of the window if fewer than *n* cells are
   available.

window.idcok(flag)

   *flag*가 "False"이면, curses는 더는 터미널의 하드웨어 문자 삽입/삭
   제 기능 사용을 고려하지 않습니다; *flag*가 "True"이면, 문자 삽입과
   삭제 사용이 활성화됩니다. curses가 처음 초기화될 때, 기본적으로 문
   자 삽입/삭제 사용이 활성화됩니다.

window.idlok(flag)

   If *flag* is "True", "curses" will try to use hardware line editing
   facilities.  Otherwise, curses will not use them.

window.immedok(flag)

   *flag*가 "True"이면, 창 이미지의 모든 변경이 자동으로 창을 새로 고
   칩니다; 더는 "refresh()"를 직접 호출할 필요가 없습니다. 그러나,
   wrefresh 호출이 반복되어, 성능이 크게 저하될 수 있습니다. 이 옵션은
   기본적으로 비활성화되어 있습니다.

window.inch([y, x])

   Return the character at the given position in the window. The
   bottom 8 bits are the character proper and the upper bits are the
   attributes; extract them with the "A_CHARTEXT" and "A_ATTRIBUTES"
   bit-masks, and the color pair with "pair_number()". The character
   byte is the locale-encoded byte of the cell's character, consistent
   with "instr()". On a wide-character build, a character that does
   not fit in a single byte in the current locale has a character byte
   of "0"; use "instr()" to read such characters.

window.insch(ch[, attr])
window.insch(y, x, ch[, attr])

   Insert character *ch* with attributes *attr* before the character
   under the cursor, or at "(y, x)" if specified.  All characters to
   the right of the cursor are shifted one position right, with the
   rightmost character on the line being lost.  The cursor position
   does not change.

window.insdelln(nlines)

   현재 줄 위의 지정된 창에 *nlines* 줄을 삽입합니다. *nlines* 바닥 줄
   은 손실됩니다. 음의 *nlines*의 경우, 커서 아래에 있는 줄에서 시작하
   여 *nlines* 줄을 삭제하고, 나머지 줄을 위로 이동합니다. 바닥
   *nlines* 줄이 지워집니다. 현재 커서 위치는 같게 유지됩니다.

window.insertln()

   커서 아래에 빈 줄을 삽입합니다. 그다음 모든 줄은 한 줄 아래로 이동
   합니다.

window.insnstr(str, n[, attr])
window.insnstr(y, x, str, n[, attr])

   커서 아래의 문자 앞에 최대 *n* 문자까지 문자열(줄에 맞는 최대 문자)
   을 삽입합니다. *n*이 0이거나 음수이면, 전체 문자열이 삽입됩니다. 커
   서 오른쪽의 모든 문자가 오른쪽으로 이동하고, 줄의 가장 오른쪽 문자
   들이 손실됩니다. 커서 위치는 변경되지 않습니다 (지정되면, *y*, *x*
   로 이동한 후에).

window.insstr(str[, attr])
window.insstr(y, x, str[, attr])

   커서 아래의 문자 앞에 문자열(줄에 맞는 최대 문자)을 삽입합니다. 커
   서 오른쪽의 모든 문자가 오른쪽으로 이동하고, 줄의 가장 오른쪽 문자
   들이 손실됩니다. 커서 위치는 변경되지 않습니다 (지정되면, *y*, *x*
   로 이동한 후에).

window.instr([n])
window.instr(y, x[, n])

   Read the text of the window from the current cursor position, or
   from *y*, *x* if specified, to the end of the line, and return it
   as a bytes object, in the encoding of the current locale.
   Attributes and color pairs are stripped. At most *n* bytes are
   read; *n* defaults to and cannot exceed 2047.

   버전 3.14에서 변경: The maximum value for *n* was increased from
   1023 to 2047.

window.is_linetouched(line)

   "refresh()"에 대한 마지막 호출 이후 지정된 줄이 수정되었으면 "True"
   를 반환합니다; 그렇지 않으면 "False"를 반환합니다. 주어진 창에서
   *line*이 유효하지 않으면 "curses.error" 예외를 발생시킵니다.

window.is_wintouched()

   "refresh()"에 대한 마지막 호출 이후 지정된 창이 수정되었으면 "True"
   를 반환합니다; 그렇지 않으면 "False"를 반환합니다.

window.keypad(flag)

   If *flag* is "True", escape sequences generated by some keys
   (keypad,  function keys) will be interpreted by "curses". If *flag*
   is "False", escape sequences will be left as is in the input
   stream. Keypad mode is disabled by default, but "wrapper()" enables
   it for the main window.

window.leaveok(flag)

   If *flag* is "True", cursor is left where it is on update, instead
   of being at "cursor position."  This reduces cursor movement where
   possible.

   *flag*가 "False"이면, 커서는 갱신 후 항상 "커서 위치"에 있게 됩니다
   .

window.move(new_y, new_x)

   커서를 "(new_y, new_x)"로 이동합니다.

window.mvderwin(y, x)

   창을 부모 창 내부로 이동합니다. 창의 화면에 상대적인 매개 변수는 변
   경되지 않습니다. 이 루틴은 부모 창의 다른 부분을 화면에서 같은 물리
   적 위치에 표시하는 데 사용됩니다.

window.mvwin(new_y, new_x)

   왼쪽 위 모서리가 "(new_y, new_x)"가 되도록 창을 이동합니다.

   Moving the window so that any part of it would be off the screen is
   an error: the window is not moved and "curses.error" is raised.

window.nodelay(flag)

   *flag*가 "True"이면, "getch()"가 비 블로킹이 됩니다.

window.notimeout(flag)

   *flag*가 "True"이면, 이스케이프 시퀀스가 시간 초과하지 않습니다.

   *flag*가 "False"이면, 몇 밀리초 후에, 이스케이프 시퀀스가 해석되지
   않고, 그대로 입력 스트림에 남아 있습니다.

window.noutrefresh()
window.noutrefresh(pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)

   새로 고침을 표시하지만 기다립니다. 이 함수는 원하는 창의 상태를 나
   타내는 데이터 구조를 갱신하지만, 물리적 화면을 강제로 갱신하지는 않
   습니다. 이를 위해서는, "doupdate()"를 호출하십시오.

   The 6 arguments can only be specified, and are then required, when
   the window is a pad created with "newpad()"; they have the same
   meaning as for "refresh()".

window.overlay(destwin[, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol])

   *destwin* 위에 창을 오버레이 합니다. 창의 크기가 같을 필요는 없으며
   , 겹치는 영역만 복사됩니다. 이 복사는 비 파괴적인데, 현재 배경 문자
   가 *destwin*의 이전 내용을 덮어쓰지 않습니다.

   복사되는 영역을 세밀하게 제어하기 위해, "overlay()"의 두 번째 형식
   을 사용할 수 있습니다. *sminrow*와 *smincol*은 소스 창의 왼쪽 위 좌
   표이며, 다른 변수들은 대상 창의 사각형을 표시합니다.

window.overwrite(destwin[, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol])

   *destwin* 위에 창을 덮어씁니다. 창의 크기가 같을 필요는 없으며, 이
   경우 겹치는 영역만 복사됩니다. 이 복사는 파괴적인데, 현재 배경 문자
   가 *destwin*의 이전 내용을 덮어씁니다.

   복사된 영역을 세밀하게 제어하기 위해, "overwrite()"의 두 번째 형식
   을 사용할 수 있습니다. *sminrow*와 *smincol*은 소스 창의 왼쪽 위 좌
   표이며, 다른 변수들은 대상 창의 사각형을 표시합니다.

window.putwin(file)

   창과 연관된 모든 데이터를 제공된 파일 객체에 기록합니다. 이 정보는
   나중에 "getwin()" 함수를 사용하여 가져올 수 있습니다.

window.redrawln(beg, num)

   *beg* 줄에서 시작하는 *num* 화면 줄이 손상되었으며 다음 "refresh()"
   호출에서 완전히 다시 그려야 함을 나타냅니다.

window.redrawwin()

   전체 창을 터치하여, 다음 "refresh()" 호출에서 완전히 다시 그려지도
   록 합니다.

window.refresh([pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol])

   화면을 즉시 갱신합니다 (이전 그리기/삭제 메서드와 실제 화면을 동기
   화합니다).

   The 6 arguments can only be specified, and are then required, when
   the window is a pad created with "newpad()".  The additional
   parameters are needed to indicate what part of the pad and screen
   are involved. *pminrow* and *pmincol* specify the upper-left corner
   of the rectangle to be displayed in the pad.  *sminrow*, *smincol*,
   *smaxrow*, and *smaxcol* specify the edges of the rectangle to be
   displayed on the screen.  The lower-right corner of the rectangle
   to be displayed in the pad is calculated from the screen
   coordinates, since the rectangles must be the same size.  Both
   rectangles must be entirely contained within their respective
   structures.  Negative values of *pminrow*, *pmincol*, *sminrow*, or
   *smincol* are treated as if they were zero.

window.resize(nlines, ncols)

   curses 창의 스토리지를 재할당하여 지정된 값으로 크기를 조정합니다.
   두 크기 중 하나가 현재 값보다 크면, 창의 데이터는 현재 배경 변환
   ("bkgdset()"으로 설정한)을 갖는 공백으로 채워집니다.

window.scroll([lines=1])

   Scroll the screen or scrolling region.  Scroll upward by *lines*
   lines if *lines* is positive, or downward if it is negative.
   Scrolling has no effect unless it has been enabled for the window
   with "scrollok()".

window.scrollok(flag)

   맨 아래 줄에서의 줄 바꾸기나 마지막 줄의 마지막 문자 입력의 결과로,
   창의 커서가 창이나 스크롤 영역의 경계를 벗어날 때 어떻게 할지를 제
   어합니다. *flag*가 "False"이면, 맨 아래 줄에 남습니다. *flag*가
   "True"이면, 창은 한 줄 위로 스크롤 됩니다. 터미널에서 물리적 스크롤
   효과를 얻으려면, "idlok()"도 호출해야 함에 유의하십시오.

window.setscrreg(top, bottom)

   스크롤 영역을 *top* 줄에서 *bottom* 줄로 설정합니다. 모든 스크롤 작
   업은 이 영역에서 수행됩니다.

window.standend()

   스탠드 아웃(standout) 속성을 끕니다. 일부 터미널에서는 모든 속성을
   끄는 부작용이 있습니다.

window.standout()

   속성 *A_STANDOUT*을 켭니다.

window.subpad(begin_y, begin_x)
window.subpad(nlines, ncols, begin_y, begin_x)

   Return a sub-pad, whose upper-left corner is at "(begin_y,
   begin_x)", and whose width/height is *ncols*/*nlines*.  The
   coordinates are relative to the parent pad (unlike "subwin()",
   which uses screen coordinates).  This method is only available for
   pads created with "newpad()".

window.subwin(begin_y, begin_x)
window.subwin(nlines, ncols, begin_y, begin_x)

   Return a sub-window, whose upper-left corner is at the screen-
   relative coordinates "(begin_y, begin_x)", and whose width/height
   is *ncols*/*nlines*.

   기본적으로, 서브 창은 지정된 위치에서 창의 오른쪽 아래 모서리에 이
   릅니다.

window.syncdown()

   조상 창에서 터치된 창의 각 위치를 터치합니다. 이 루틴은 "refresh()"
   에 의해 호출되므로, 수동으로 호출할 필요가 거의 없습니다.

window.syncok(flag)

   *flag*가 "True"이면, 창에 변경 사항이 있을 때마다 "syncup()"이 자동
   으로 호출됩니다.

window.syncup()

   창에서 변경된 창 조상의 모든 위치를 터치합니다.

window.timeout(delay)

   창의 블로킹이나 비 블로킹 읽기 동작을 설정합니다. *delay*가 음수이
   면, 블로킹 읽기가 사용됩니다 (입력을 무한정 기다립니다). *delay*가
   0이면, 비 블로킹 읽기가 사용되며, 대기 중인 입력이 없으면 "getch()"
   는 "-1"을 반환합니다. *delay*가 양수이면, "getch()"는 *delay* 밀리
   초 동안 블록 하고, 해당 시간이 지나도 여전히 입력이 없으면 "-1"을
   반환합니다.

window.touchline(start, count[, changed])

   줄 *start*로 시작하여 *count* 줄이 변경된 것으로 가정합니다.
   *changed*가 제공되면, 영향을 받는 줄이 변경되었다고
   (*changed*"=True") 또는 변경되지 않았다고 (*changed*"=False") 표시
   할지를 지정합니다.

window.touchwin()

   그리기 최적화를 위해, 전체 창이 변경된 것으로 가정합니다.

window.untouchwin()

   "refresh()"를 마지막으로 호출한 후에 창의 모든 줄을 변경되지 않은
   것으로 표시합니다.

window.vline(ch, n[, attr])
window.vline(y, x, ch, n[, attr])

   *attr* 속성을 가진 문자 *ch*로 구성된 길이 *n*의 "(y, x)"에서 시작
   하는 세로 선을 표시합니다.


상수
====

The "curses" module defines the following data members:

curses.ERR

   정수를 반환하는 일부 curses 루틴은 (가령 "getch()") 실패 시 "ERR"을
   반환합니다.

curses.OK

   정수를 반환하는 일부 curses 루틴은 (가령 "napms()") 성공 시 "OK"를
   반환합니다.

curses.version

   모듈의 현재 버전을 나타내는 바이트열 객체.

curses.ncurses_version

   ncurses 라이브러리 버전의 세 가지 구성 요소를 포함하는 네임드 튜플:
   *major*, *minor* 및 *patch*. 모든 값은 정수입니다. 구성 요소는 이름
   으로도 액세스 할 수 있어서, "curses.ncurses_version[0]"은
   "curses.ncurses_version.major"와 동등합니다.

   가용성: ncurses 라이브러리가 사용된 경우.

   Added in version 3.8.

curses.COLORS

   The maximum number of colors the terminal can support. It is
   defined only after the call to "start_color()".

curses.COLOR_PAIRS

   The maximum number of color pairs the terminal can support. It is
   defined only after the call to "start_color()".

curses.COLS

   The width of the screen, that is, the number of columns. It is
   defined only after the call to "initscr()". Updated by
   "update_lines_cols()", "resizeterm()" and "resize_term()".

curses.LINES

   The height of the screen, that is, the number of lines. It is
   defined only after the call to "initscr()". Updated by
   "update_lines_cols()", "resizeterm()" and "resize_term()".

문자 셀 속성을 지정하기 위해 일부 상수를 사용할 수 있습니다. 사용 가능
한 정확한 상수는 시스템에 따라 다릅니다.

+--------------------------+---------------------------------+
| 속성                     | 의미                            |
|==========================|=================================|
| curses.A_ALTCHARSET      | 대체 문자 집합 모드             |
+--------------------------+---------------------------------+
| curses.A_BLINK           | 깜박임 모드                     |
+--------------------------+---------------------------------+
| curses.A_BOLD            | 볼드 모드                       |
+--------------------------+---------------------------------+
| curses.A_DIM             | 희미한 모드                     |
+--------------------------+---------------------------------+
| curses.A_INVIS           | 보이지 않거나 공백 모드         |
+--------------------------+---------------------------------+
| curses.A_ITALIC          | 기울임 꼴 모드                  |
+--------------------------+---------------------------------+
| curses.A_NORMAL          | 일반 속성                       |
+--------------------------+---------------------------------+
| curses.A_PROTECT         | 보호 모드                       |
+--------------------------+---------------------------------+
| curses.A_REVERSE         | 배경과 전경색 반전              |
+--------------------------+---------------------------------+
| curses.A_STANDOUT        | 눈에 띄는 모드                  |
+--------------------------+---------------------------------+
| curses.A_UNDERLINE       | 밑줄 모드                       |
+--------------------------+---------------------------------+
| curses.A_HORIZONTAL      | 수평 하이라이트                 |
+--------------------------+---------------------------------+
| curses.A_LEFT            | 왼쪽 하이라이트                 |
+--------------------------+---------------------------------+
| curses.A_LOW             | 낮은 하이라이트                 |
+--------------------------+---------------------------------+
| curses.A_RIGHT           | 오른쪽 하이라이트               |
+--------------------------+---------------------------------+
| curses.A_TOP             | 상단 하이라이트                 |
+--------------------------+---------------------------------+
| curses.A_VERTICAL        | 수직 하이라이트                 |
+--------------------------+---------------------------------+

Added in version 3.7: "A_ITALIC"이 추가되었습니다.

일부 메서드에서 반환한 해당 속성을 추출하기 위해 여러 상수를 사용할 수
있습니다.

+---------------------------+---------------------------------+
| 비트 마스크               | 의미                            |
|===========================|=================================|
| curses.A_ATTRIBUTES       | 속성을 추출하는 비트 마스크     |
+---------------------------+---------------------------------+
| curses.A_CHARTEXT         | 문자를 추출하는 비트 마스크     |
+---------------------------+---------------------------------+
| curses.A_COLOR            | 색상 쌍 필드 정보를 추출하는 비 |
|                           | 트 마스크                       |
+---------------------------+---------------------------------+

키는 "KEY_"로 시작하는 이름을 가진 정수 상수로 참조됩니다. 사용 가능한
정확한 키 기능은 시스템에 따라 다릅니다.

+---------------------------+----------------------------------------------+
| 키 상수                   | 키                                           |
|===========================|==============================================|
| curses.KEY_MIN            | 최소 키값                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_BREAK          | 브레이크 키 (신뢰할 수 없습니다)             |
+---------------------------+----------------------------------------------+
| curses.KEY_DOWN           | 아래쪽 화살표                                |
+---------------------------+----------------------------------------------+
| curses.KEY_UP             | 위쪽 화살표                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_LEFT           | 왼쪽 화살표                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_RIGHT          | 오른쪽 화살표                                |
+---------------------------+----------------------------------------------+
| curses.KEY_HOME           | 홈 키 (위쪽+왼쪽 화살표)                     |
+---------------------------+----------------------------------------------+
| curses.KEY_BACKSPACE      | 백스페이스 (신뢰할 수 없습니다)              |
+---------------------------+----------------------------------------------+
| curses.KEY_F0             | 기능키. 최대 64개의 기능키가 지원됩니다.     |
+---------------------------+----------------------------------------------+
| curses.KEY_Fn             | 기능키 *n*의 값                              |
+---------------------------+----------------------------------------------+
| curses.KEY_DL             | 줄 삭제                                      |
+---------------------------+----------------------------------------------+
| curses.KEY_IL             | 줄 삽입                                      |
+---------------------------+----------------------------------------------+
| curses.KEY_DC             | 문자 삭제                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_IC             | 문자 삽입이나 삽입 모드로 들어가기           |
+---------------------------+----------------------------------------------+
| curses.KEY_EIC            | 문자 삽입 모드 종료                          |
+---------------------------+----------------------------------------------+
| curses.KEY_CLEAR          | 화면 지우기                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_EOS            | 화면 끝까지 지우기                           |
+---------------------------+----------------------------------------------+
| curses.KEY_EOL            | 줄 끝까지 지우기                             |
+---------------------------+----------------------------------------------+
| curses.KEY_SF             | 한 줄 앞으로 스크롤                          |
+---------------------------+----------------------------------------------+
| curses.KEY_SR             | 한 줄 뒤로 스크롤 (역)                       |
+---------------------------+----------------------------------------------+
| curses.KEY_NPAGE          | 다음 페이지                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_PPAGE          | 이전 페이지                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_STAB           | 탭 설정                                      |
+---------------------------+----------------------------------------------+
| curses.KEY_CTAB           | 탭 지우기                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_CATAB          | 모든 탭 지우기                               |
+---------------------------+----------------------------------------------+
| curses.KEY_ENTER          | 엔터나 발송 (신뢰할 수 없습니다)             |
+---------------------------+----------------------------------------------+
| curses.KEY_SRESET         | 소프트(soft) (부분) 재설정 (신뢰할 수 없습니 |
|                           | 다)                                          |
+---------------------------+----------------------------------------------+
| curses.KEY_RESET          | 재설정이나 하드(hard) 재설정 (신뢰할 수 없습 |
|                           | 니다)                                        |
+---------------------------+----------------------------------------------+
| curses.KEY_PRINT          | 인쇄                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_LL             | 홈 다운이나 바닥 (왼쪽 아래)                 |
+---------------------------+----------------------------------------------+
| curses.KEY_A1             | 키패드의 왼쪽 위                             |
+---------------------------+----------------------------------------------+
| curses.KEY_A3             | 키패드의 오른쪽 위                           |
+---------------------------+----------------------------------------------+
| curses.KEY_B2             | 키패드 가운데                                |
+---------------------------+----------------------------------------------+
| curses.KEY_C1             | 키패드의 왼쪽 아래                           |
+---------------------------+----------------------------------------------+
| curses.KEY_C3             | 키패드의 오른쪽 아래                         |
+---------------------------+----------------------------------------------+
| curses.KEY_BTAB           | 백 탭                                        |
+---------------------------+----------------------------------------------+
| curses.KEY_BEG            | Beg (시작)                                   |
+---------------------------+----------------------------------------------+
| curses.KEY_CANCEL         | 취소                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_CLOSE          | 닫기                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_COMMAND        | Cmd (명령)                                   |
+---------------------------+----------------------------------------------+
| curses.KEY_COPY           | 복사                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_CREATE         | 생성                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_END            | 끝                                           |
+---------------------------+----------------------------------------------+
| curses.KEY_EXIT           | 종료                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_FIND           | 찾기                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_HELP           | 도움말                                       |
+---------------------------+----------------------------------------------+
| curses.KEY_MARK           | 표시                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_MESSAGE        | 메시지                                       |
+---------------------------+----------------------------------------------+
| curses.KEY_MOVE           | 이동                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_NEXT           | 다음                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_OPEN           | 열기                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_OPTIONS        | 옵션                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_PREVIOUS       | Prev (이전)                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_REDO           | 다시 하기                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_REFERENCE      | Ref (참조)                                   |
+---------------------------+----------------------------------------------+
| curses.KEY_REFRESH        | 새로 고침                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_REPLACE        | 교체                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_RESTART        | 재시작                                       |
+---------------------------+----------------------------------------------+
| curses.KEY_RESUME         | 재개                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_SAVE           | 저장                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_SBEG           | 시프트 Beg (시작)                            |
+---------------------------+----------------------------------------------+
| curses.KEY_SCANCEL        | 시프트 취소                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SCOMMAND       | 시프트 명령                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SCOPY          | 시프트 복사                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SCREATE        | 시프트 생성                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SDC            | 시프트 문자 삭제                             |
+---------------------------+----------------------------------------------+
| curses.KEY_SDL            | 시프트 줄 삭제                               |
+---------------------------+----------------------------------------------+
| curses.KEY_SELECT         | 선택                                         |
+---------------------------+----------------------------------------------+
| curses.KEY_SEND           | 시프트 끝                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_SEOL           | 시프트 줄 지우기                             |
+---------------------------+----------------------------------------------+
| curses.KEY_SEXIT          | 시프트 종료                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SFIND          | 시프트 찾기                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SHELP          | 시프트 도움말                                |
+---------------------------+----------------------------------------------+
| curses.KEY_SHOME          | 시프트 홈                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_SIC            | 시프트 입력                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SLEFT          | 시프트 왼쪽 화살표                           |
+---------------------------+----------------------------------------------+
| curses.KEY_SMESSAGE       | 시프트 메시지                                |
+---------------------------+----------------------------------------------+
| curses.KEY_SMOVE          | 시프트 이동                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SNEXT          | 시프트 다음                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SOPTIONS       | 시프트 옵션                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SPREVIOUS      | 시프트 Prev                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SPRINT         | 시프트 인쇄                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SREDO          | 시프트 다시 하기                             |
+---------------------------+----------------------------------------------+
| curses.KEY_SREPLACE       | 시프트 교체                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SRIGHT         | 시프트 오른쪽 화살표                         |
+---------------------------+----------------------------------------------+
| curses.KEY_SRSUME         | 시프트 재개                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SSAVE          | 시프트 저장                                  |
+---------------------------+----------------------------------------------+
| curses.KEY_SSUSPEND       | 시프트 일시 중단                             |
+---------------------------+----------------------------------------------+
| curses.KEY_SUNDO          | 시프트 실행 취소                             |
+---------------------------+----------------------------------------------+
| curses.KEY_SUSPEND        | 일시 중단                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_UNDO           | 실행 취소                                    |
+---------------------------+----------------------------------------------+
| curses.KEY_MOUSE          | 마우스 이벤트가 발생했습니다                 |
+---------------------------+----------------------------------------------+
| curses.KEY_RESIZE         | 터미널 크기 조정 이벤트                      |
+---------------------------+----------------------------------------------+
| curses.KEY_MAX            | 최대 키값                                    |
+---------------------------+----------------------------------------------+

VT100과 이의 소프트웨어 에뮬레이션(가령 X 터미널 에뮬레이터)에는, 일반
적으로 사용 가능한 기능키가 적어도 4개 ("KEY_F1", "KEY_F2", "KEY_F3",
"KEY_F4") 있고, 화살표 키는 "KEY_UP", "KEY_DOWN", "KEY_LEFT" 및
"KEY_RIGHT"에 명백한 방식으로 매핑됩니다. 여러분의 기계에 PC 키보드가
있으면, 화살표 키와 12개의 기능키를 기대하는 것이 안전합니다 (이전 PC
키보드에는 10개의 기능키만 있을 수 있습니다); 또한, 다음과 같은 키패드
매핑이 표준입니다:

+--------------------+-------------+
| 키 기능            | 상수        |
|====================|=============|
| "Insert"           | KEY_IC      |
+--------------------+-------------+
| "Delete"           | KEY_DC      |
+--------------------+-------------+
| "Home"             | KEY_HOME    |
+--------------------+-------------+
| "End"              | KEY_END     |
+--------------------+-------------+
| "Page Up"          | KEY_PPAGE   |
+--------------------+-------------+
| "Page Down"        | KEY_NPAGE   |
+--------------------+-------------+

다음 표는 대체 문자 집합의 문자를 나열합니다. 이들은 VT100 터미널에서
상속되며, 일반적으로 X 터미널과 같은 소프트웨어 에뮬레이션에서 사용할
수 있습니다. 사용 가능한 그래픽이 없으면, curses는 조잡한 인쇄 가능한
ASCII 근사치로 폴 백 합니다.

참고:

  "initscr()"가 호출된 후에만 사용할 수 있습니다.

+--------------------------+--------------------------------------------+
| ACS 코드                 | 의미                                       |
|==========================|============================================|
| curses.ACS_BBSS          | alternate name for upper-right corner      |
+--------------------------+--------------------------------------------+
| curses.ACS_BLOCK         | 채워진 사각형 블록                         |
+--------------------------+--------------------------------------------+
| curses.ACS_BOARD         | 사각형의 보드                              |
+--------------------------+--------------------------------------------+
| curses.ACS_BSBS          | 수평선의 대체 이름                         |
+--------------------------+--------------------------------------------+
| curses.ACS_BSSB          | alternate name for upper-left corner       |
+--------------------------+--------------------------------------------+
| curses.ACS_BSSS          | 상단 티(top tee)의 대체 이름               |
+--------------------------+--------------------------------------------+
| curses.ACS_BTEE          | 하단 티(bottom tee)                        |
+--------------------------+--------------------------------------------+
| curses.ACS_BULLET        | 불릿                                       |
+--------------------------+--------------------------------------------+
| curses.ACS_CKBOARD       | 체커 보드 (점각)                           |
+--------------------------+--------------------------------------------+
| curses.ACS_DARROW        | 아래쪽을 가리키는 화살표                   |
+--------------------------+--------------------------------------------+
| curses.ACS_DEGREE        | 디그리 기호                                |
+--------------------------+--------------------------------------------+
| curses.ACS_DIAMOND       | 다이아몬드                                 |
+--------------------------+--------------------------------------------+
| curses.ACS_GEQUAL        | 크거나 같음                                |
+--------------------------+--------------------------------------------+
| curses.ACS_HLINE         | 수평선                                     |
+--------------------------+--------------------------------------------+
| curses.ACS_LANTERN       | 랜턴 기호                                  |
+--------------------------+--------------------------------------------+
| curses.ACS_LARROW        | 왼쪽 화살표                                |
+--------------------------+--------------------------------------------+
| curses.ACS_LEQUAL        | 작거나 같음                                |
+--------------------------+--------------------------------------------+
| curses.ACS_LLCORNER      | lower-left corner                          |
+--------------------------+--------------------------------------------+
| curses.ACS_LRCORNER      | lower-right corner                         |
+--------------------------+--------------------------------------------+
| curses.ACS_LTEE          | 왼쪽 티(left tee)                          |
+--------------------------+--------------------------------------------+
| curses.ACS_NEQUAL        | 같지 않음 기호                             |
+--------------------------+--------------------------------------------+
| curses.ACS_PI            | 글자 파이(pi)                              |
+--------------------------+--------------------------------------------+
| curses.ACS_PLMINUS       | 더하기-또는-빼기 기호                      |
+--------------------------+--------------------------------------------+
| curses.ACS_PLUS          | 큰 더하기 기호                             |
+--------------------------+--------------------------------------------+
| curses.ACS_RARROW        | 오른쪽 화살표                              |
+--------------------------+--------------------------------------------+
| curses.ACS_RTEE          | 오른쪽 티(right tee)                       |
+--------------------------+--------------------------------------------+
| curses.ACS_S1            | 스캔 줄 1                                  |
+--------------------------+--------------------------------------------+
| curses.ACS_S3            | 스캔 줄 3                                  |
+--------------------------+--------------------------------------------+
| curses.ACS_S7            | 스캔 줄 7                                  |
+--------------------------+--------------------------------------------+
| curses.ACS_S9            | 스캔 줄 9                                  |
+--------------------------+--------------------------------------------+
| curses.ACS_SBBS          | alternate name for lower-right corner      |
+--------------------------+--------------------------------------------+
| curses.ACS_SBSB          | 세로줄의 대체 이름                         |
+--------------------------+--------------------------------------------+
| curses.ACS_SBSS          | 오른쪽 티의 대체 이름                      |
+--------------------------+--------------------------------------------+
| curses.ACS_SSBB          | alternate name for lower-left corner       |
+--------------------------+--------------------------------------------+
| curses.ACS_SSBS          | 하단 티의 대체 이름                        |
+--------------------------+--------------------------------------------+
| curses.ACS_SSSB          | 왼쪽 티의 대체 이름                        |
+--------------------------+--------------------------------------------+
| curses.ACS_SSSS          | 크로스 오버(crossover) 또는 큰 더하기의 대 |
|                          | 체 이름                                    |
+--------------------------+--------------------------------------------+
| curses.ACS_STERLING      | 파운드 스털링(pound sterling)              |
+--------------------------+--------------------------------------------+
| curses.ACS_TTEE          | 상단 티(top tee)                           |
+--------------------------+--------------------------------------------+
| curses.ACS_UARROW        | 위쪽 화살표                                |
+--------------------------+--------------------------------------------+
| curses.ACS_ULCORNER      | upper-left corner                          |
+--------------------------+--------------------------------------------+
| curses.ACS_URCORNER      | upper-right corner                         |
+--------------------------+--------------------------------------------+
| curses.ACS_VLINE         | 수직선                                     |
+--------------------------+--------------------------------------------+

The following table lists mouse button constants used by "getmouse()":

+------------------------------------+-----------------------------------------------+
| 마우스 버튼 상수                   | 의미                                          |
|====================================|===============================================|
| curses.BUTTONn_PRESSED             | Mouse button *n* pressed                      |
+------------------------------------+-----------------------------------------------+
| curses.BUTTONn_RELEASED            | Mouse button *n* released                     |
+------------------------------------+-----------------------------------------------+
| curses.BUTTONn_CLICKED             | Mouse button *n* clicked                      |
+------------------------------------+-----------------------------------------------+
| curses.BUTTONn_DOUBLE_CLICKED      | Mouse button *n* double clicked               |
+------------------------------------+-----------------------------------------------+
| curses.BUTTONn_TRIPLE_CLICKED      | Mouse button *n* triple clicked               |
+------------------------------------+-----------------------------------------------+
| curses.BUTTON_SHIFT                | Shift was down during button state change     |
+------------------------------------+-----------------------------------------------+
| curses.BUTTON_CTRL                 | Control was down during button state change   |
+------------------------------------+-----------------------------------------------+
| curses.BUTTON_ALT                  | Alt was down during button state change       |
+------------------------------------+-----------------------------------------------+

버전 3.10에서 변경: The "BUTTON5_*" constants are now exposed if they
are provided by the underlying curses library.

다음 표는 사전 정의된 색상을 나열합니다:

+---------------------------+------------------------------+
| 상수                      | 색상                         |
|===========================|==============================|
| curses.COLOR_BLACK        | 검은색                       |
+---------------------------+------------------------------+
| curses.COLOR_BLUE         | 파랑                         |
+---------------------------+------------------------------+
| curses.COLOR_CYAN         | 시안 (청록색 - 밝은 초록이   |
|                           | 섞인 파랑)                   |
+---------------------------+------------------------------+
| curses.COLOR_GREEN        | 초록                         |
+---------------------------+------------------------------+
| curses.COLOR_MAGENTA      | 마젠타 (자홍색)              |
+---------------------------+------------------------------+
| curses.COLOR_RED          | 빨강                         |
+---------------------------+------------------------------+
| curses.COLOR_WHITE        | 흰색                         |
+---------------------------+------------------------------+
| curses.COLOR_YELLOW       | 노랑                         |
+---------------------------+------------------------------+


"curses.textpad" --- Text input widget for curses programs
**********************************************************

The "curses.textpad" module provides a "Textbox" class that handles
elementary text editing in a curses window, supporting a set of
keybindings resembling those of Emacs (thus, also of Netscape
Navigator, BBedit 6.x, FrameMaker, and many other programs).  The
module also provides a rectangle-drawing function useful for framing
text boxes or for other purposes.

The module "curses.textpad" defines the following function:

curses.textpad.rectangle(win, uly, ulx, lry, lrx)

   Draw a rectangle.  The first argument must be a window object; the
   remaining arguments are coordinates relative to that window.  The
   second and third arguments are the y and x coordinates of the
   upper-left corner of the rectangle to be drawn; the fourth and
   fifth arguments are the y and x coordinates of the lower-right
   corner. The rectangle will be drawn using VT100/IBM PC forms
   characters on terminals that make this possible (including xterm
   and most other software terminal emulators).  Otherwise it will be
   drawn with ASCII  dashes, vertical bars, and plus signs.


Textbox 객체
============

다음과 같이 "Textbox" 객체를 인스턴스 화 할 수 있습니다:

class curses.textpad.Textbox(win, insert_mode=False)

   Return a textbox widget object.  The *win* argument should be a
   curses window object in which the textbox is to be contained.  If
   *insert_mode* is true, the textbox inserts typed characters,
   shifting existing text to the right, rather than overwriting it.
   The edit cursor of the textbox is initially located at the upper-
   left corner of the containing window, with coordinates "(0, 0)".
   The instance's "stripspaces" flag is initially on.

   "Textbox" 객체에는 다음과 같은 메서드가 있습니다:

   edit(validate=None)

      This is the entry point you will normally use.  It accepts
      editing keystrokes until one of the termination keystrokes is
      entered.  If *validate* is supplied, it must be a function.  It
      will be called for each keystroke entered with the keystroke as
      a parameter; command dispatch is done on the result.  If it
      returns a false value, the keystroke is ignored.  This method
      returns the window contents as a string; whether blanks in the
      window are included is affected by the "stripspaces" attribute.

   do_command(ch)

      Process a single command keystroke.  Returns "1" to continue
      editing, or "0" if a termination keystroke was processed.  Here
      are the supported special keystrokes:

      +--------------------+---------------------------------------------+
      | 키 입력            | 동작                                        |
      |====================|=============================================|
      | "Control"-"A"      | 창의 왼쪽 가장자리로 이동합니다.            |
      +--------------------+---------------------------------------------+
      | "Control"-"B"      | 커서를 왼쪽으로 옮깁니다, 필요하면 앞줄로   |
      |                    | 넘어갑니다.                                 |
      +--------------------+---------------------------------------------+
      | "Control"-"D"      | 커서 아래의 문자를 삭제합니다.              |
      +--------------------+---------------------------------------------+
      | "Control"-"E"      | 오른쪽 가장자리(stripspaces가 꺼졌을 때)나  |
      |                    | 줄 끝(stripspaces가 켜졌을 때)으로 이동합니 |
      |                    | 다.                                         |
      +--------------------+---------------------------------------------+
      | "Control"-"F"      | 커서를 오른쪽으로 옮깁니다, 필요하면 다음   |
      |                    | 줄로 넘어갑니다.                            |
      +--------------------+---------------------------------------------+
      | "Control"-"G"      | 종료하고, 창 내용을 반환합니다.             |
      +--------------------+---------------------------------------------+
      | "Control"-"H"      | 문자를 뒤로 삭제합니다.                     |
      +--------------------+---------------------------------------------+
      | "Control"-"J"      | Terminate if the window is 1 line,          |
      |                    | otherwise move to the start of the next     |
      |                    | line.                                       |
      +--------------------+---------------------------------------------+
      | "Control"-"K"      | 줄이 비어 있으면, 삭제하고, 그렇지 않으면   |
      |                    | 줄 끝까지 지웁니다.                         |
      +--------------------+---------------------------------------------+
      | "Control"-"L"      | 화면을 새로 고칩니다.                       |
      +--------------------+---------------------------------------------+
      | "Control"-"N"      | 커서를 아래로 옮깁니다; 한 줄 아래로 이동합 |
      |                    | 니다.                                       |
      +--------------------+---------------------------------------------+
      | "Control"-"O"      | 커서 위치에 빈 줄을 삽입합니다.             |
      +--------------------+---------------------------------------------+
      | "Control"-"P"      | 커서를 위로 옮깁니다; 한 줄 위로 이동합니다 |
      |                    | .                                           |
      +--------------------+---------------------------------------------+

      이동이 불가능한 가장자리에 커서가 있으면 이동 연산이 수행되지 않
      습니다. 가능하면 다음 동의어가 지원됩니다:

      +----------------------------------+--------------------+
      | 상수                             | 키 입력            |
      |==================================|====================|
      | "KEY_LEFT"                       | "Control"-"B"      |
      +----------------------------------+--------------------+
      | "KEY_RIGHT"                      | "Control"-"F"      |
      +----------------------------------+--------------------+
      | "KEY_UP"                         | "Control"-"P"      |
      +----------------------------------+--------------------+
      | "KEY_DOWN"                       | "Control"-"N"      |
      +----------------------------------+--------------------+
      | "KEY_BACKSPACE"                  | "Control"-"h"      |
      +----------------------------------+--------------------+

      다른 모든 키 입력은 주어진 문자를 삽입하고 (줄 넘김을 포함한) 오
      른쪽으로 이동하는 명령으로 처리됩니다.

   gather()

      창 내용을 문자열로 반환합니다; 창의 공백이 포함되는지는
      "stripspaces" 멤버의 영향을 받습니다.

   stripspaces

      이 어트리뷰트는 창의 공백 해석을 제어하는 플래그입니다. 켜져 있
      으면, 각 줄의 후행 공백이 무시됩니다; 후행 공백에 커서를 놓는 커
      서 동작은 대신 해당 줄의 끝으로 이동하고, 창 내용이 수집될 때 후
      행 공백이 제거됩니다.
