Mercurial > cpython-lru_cache-weakref
annotate Doc/mac/libmacconsole.tex @ 15842:f6cd36498a50 legacy-trunk
Document extensions to .pth files.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Sat, 13 Jan 2001 09:54:41 +0000 |
| parents | 61224459bb09 |
| children |
| rev | line source |
|---|---|
| 8915 | 1 \section{\module{macconsole} --- |
| 10334 | 2 Think C's console package} |
| 3 | |
|
8715
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
4 \declaremodule{builtin}{macconsole} |
| 10334 | 5 \platform{Mac} |
| 8915 | 6 \modulesynopsis{Think C's console package.} |
|
8715
c750c7a21e03
Adjusted to use the new \declaremodule \modulesynopsis \localmoduletable
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
7 |
| 2452 | 8 |
| 9 This module is available on the Macintosh, provided Python has been | |
| 10334 | 10 built using the Think C compiler. It provides an interface to the |
| 2452 | 11 Think console package, with which basic text windows can be created. |
| 12 | |
| 13 \begin{datadesc}{options} | |
| 14 An object allowing you to set various options when creating windows, | |
| 15 see below. | |
| 16 \end{datadesc} | |
| 17 | |
| 18 \begin{datadesc}{C_ECHO} | |
| 19 \dataline{C_NOECHO} | |
| 20 \dataline{C_CBREAK} | |
| 21 \dataline{C_RAW} | |
| 7688 | 22 Options for the \code{setmode} method. \constant{C_ECHO} and |
| 23 \constant{C_CBREAK} enable character echo, the other two disable it, | |
| 24 \constant{C_ECHO} and \constant{C_NOECHO} enable line-oriented input | |
| 25 (erase/kill processing, etc). | |
| 2452 | 26 \end{datadesc} |
| 27 | |
| 28 \begin{funcdesc}{copen}{} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
29 Open a new console window. Return a console window object. |
| 2452 | 30 \end{funcdesc} |
| 31 | |
| 32 \begin{funcdesc}{fopen}{fp} | |
| 33 Return the console window object corresponding with the given file | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
34 object. \var{fp} should be one of \code{sys.stdin}, \code{sys.stdout} or |
|
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
35 \code{sys.stderr}. |
| 2452 | 36 \end{funcdesc} |
| 37 | |
| 38 \subsection{macconsole options object} | |
| 39 These options are examined when a window is created: | |
| 40 | |
|
7277
bf4e790bd61a
Remove all \bcode / \ecode cruft; this is no longer needed. See previous
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
41 \setindexsubitem{(macconsole option)} |
| 2452 | 42 \begin{datadesc}{top} |
| 43 \dataline{left} | |
| 44 The origin of the window. | |
| 45 \end{datadesc} | |
| 46 | |
| 47 \begin{datadesc}{nrows} | |
| 48 \dataline{ncols} | |
| 49 The size of the window. | |
| 50 \end{datadesc} | |
| 51 | |
| 52 \begin{datadesc}{txFont} | |
| 53 \dataline{txSize} | |
| 54 \dataline{txStyle} | |
| 55 The font, fontsize and fontstyle to be used in the window. | |
| 56 \end{datadesc} | |
| 57 | |
| 58 \begin{datadesc}{title} | |
| 59 The title of the window. | |
| 60 \end{datadesc} | |
| 61 | |
| 62 \begin{datadesc}{pause_atexit} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
63 If set non-zero, the window will wait for user action before closing. |
| 2452 | 64 \end{datadesc} |
| 65 | |
| 66 \subsection{console window object} | |
| 67 | |
|
7277
bf4e790bd61a
Remove all \bcode / \ecode cruft; this is no longer needed. See previous
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
68 \setindexsubitem{(console window attribute)} |
| 2452 | 69 |
| 70 \begin{datadesc}{file} | |
| 71 The file object corresponding to this console window. If the file is | |
| 7688 | 72 buffered, you should call \code{\var{file}.flush()} between |
| 73 \code{write()} and \code{read()} calls. | |
| 2452 | 74 \end{datadesc} |
| 75 | |
|
7277
bf4e790bd61a
Remove all \bcode / \ecode cruft; this is no longer needed. See previous
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
76 \setindexsubitem{(console window method)} |
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2527
diff
changeset
|
77 |
| 2452 | 78 \begin{funcdesc}{setmode}{mode} |
| 7688 | 79 Set the input mode of the console to \constant{C_ECHO}, etc. |
| 2452 | 80 \end{funcdesc} |
| 81 | |
| 82 \begin{funcdesc}{settabs}{n} | |
| 83 Set the tabsize to \var{n} spaces. | |
| 84 \end{funcdesc} | |
| 85 | |
| 86 \begin{funcdesc}{cleos}{} | |
| 87 Clear to end-of-screen. | |
| 88 \end{funcdesc} | |
| 89 | |
| 90 \begin{funcdesc}{cleol}{} | |
| 91 Clear to end-of-line. | |
| 92 \end{funcdesc} | |
| 93 | |
| 94 \begin{funcdesc}{inverse}{onoff} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
95 Enable inverse-video mode:\ characters with the high bit set are |
| 2452 | 96 displayed in inverse video (this disables the upper half of a |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
97 non-\ASCII{} character set). |
| 2452 | 98 \end{funcdesc} |
| 99 | |
|
7712
0cbc9df882b6
Change "\," to just "," in function signatures. This is easier to maintain,
Fred Drake <fdrake@acm.org>
parents:
7688
diff
changeset
|
100 \begin{funcdesc}{gotoxy}{x, y} |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
101 Set the cursor to position \code{(\var{x}, \var{y})}. |
| 2452 | 102 \end{funcdesc} |
| 103 | |
| 104 \begin{funcdesc}{hide}{} | |
| 105 Hide the window, remembering the contents. | |
| 106 \end{funcdesc} | |
| 107 | |
| 108 \begin{funcdesc}{show}{} | |
| 109 Show the window again. | |
| 110 \end{funcdesc} | |
| 111 | |
| 112 \begin{funcdesc}{echo2printer}{} | |
| 113 Copy everything written to the window to the printer as well. | |
| 114 \end{funcdesc} |
