Mercurial > cpython-lru_cache-weakref
annotate Doc/mac/libmacconsole.tex @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | f47bc5554418 |
| children | 3468ea8645ca |
| rev | line source |
|---|---|
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2527
diff
changeset
|
1 \section{Built-in Module \sectcode{macconsole}} |
| 2452 | 2 \bimodindex{macconsole} |
| 3 | |
|
2453
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2452
diff
changeset
|
4 \renewcommand{\indexsubitem}{(in module macconsole)} |
|
cdd3a721b40e
a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents:
2452
diff
changeset
|
5 |
| 2452 | 6 This module is available on the Macintosh, provided Python has been |
| 7 built using the Think C compiler. It provides an interface to the | |
| 8 Think console package, with which basic text windows can be created. | |
| 9 | |
| 10 \begin{datadesc}{options} | |
| 11 An object allowing you to set various options when creating windows, | |
| 12 see below. | |
| 13 \end{datadesc} | |
| 14 | |
| 15 \begin{datadesc}{C_ECHO} | |
| 16 \dataline{C_NOECHO} | |
| 17 \dataline{C_CBREAK} | |
| 18 \dataline{C_RAW} | |
| 19 Options for the \code{setmode} method. \var{C_ECHO} and \var{C_CBREAK} | |
| 20 enable character echo, the other two disable it, \var{C_ECHO} and | |
| 21 \var{C_NOECHO} enable line-oriented input (erase/kill processing, | |
| 22 etc). | |
| 23 \end{datadesc} | |
| 24 | |
| 25 \begin{funcdesc}{copen}{} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
26 Open a new console window. Return a console window object. |
| 2452 | 27 \end{funcdesc} |
| 28 | |
| 29 \begin{funcdesc}{fopen}{fp} | |
| 30 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
|
31 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
|
32 \code{sys.stderr}. |
| 2452 | 33 \end{funcdesc} |
| 34 | |
| 35 \subsection{macconsole options object} | |
| 36 These options are examined when a window is created: | |
| 37 | |
| 38 \renewcommand{\indexsubitem}{(macconsole option)} | |
| 39 \begin{datadesc}{top} | |
| 40 \dataline{left} | |
| 41 The origin of the window. | |
| 42 \end{datadesc} | |
| 43 | |
| 44 \begin{datadesc}{nrows} | |
| 45 \dataline{ncols} | |
| 46 The size of the window. | |
| 47 \end{datadesc} | |
| 48 | |
| 49 \begin{datadesc}{txFont} | |
| 50 \dataline{txSize} | |
| 51 \dataline{txStyle} | |
| 52 The font, fontsize and fontstyle to be used in the window. | |
| 53 \end{datadesc} | |
| 54 | |
| 55 \begin{datadesc}{title} | |
| 56 The title of the window. | |
| 57 \end{datadesc} | |
| 58 | |
| 59 \begin{datadesc}{pause_atexit} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
60 If set non-zero, the window will wait for user action before closing. |
| 2452 | 61 \end{datadesc} |
| 62 | |
| 63 \subsection{console window object} | |
| 64 | |
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2527
diff
changeset
|
65 \renewcommand{\indexsubitem}{(console window attribute)} |
| 2452 | 66 |
| 67 \begin{datadesc}{file} | |
| 68 The file object corresponding to this console window. If the file is | |
| 69 buffered, you should call \code{file.flush()} between \code{write()} | |
| 70 and \code{read()} calls. | |
| 71 \end{datadesc} | |
| 72 | |
|
2576
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2527
diff
changeset
|
73 \renewcommand{\indexsubitem}{(console window method)} |
|
f47bc5554418
mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents:
2527
diff
changeset
|
74 |
| 2452 | 75 \begin{funcdesc}{setmode}{mode} |
| 76 Set the input mode of the console to \var{C_ECHO}, etc. | |
| 77 \end{funcdesc} | |
| 78 | |
| 79 \begin{funcdesc}{settabs}{n} | |
| 80 Set the tabsize to \var{n} spaces. | |
| 81 \end{funcdesc} | |
| 82 | |
| 83 \begin{funcdesc}{cleos}{} | |
| 84 Clear to end-of-screen. | |
| 85 \end{funcdesc} | |
| 86 | |
| 87 \begin{funcdesc}{cleol}{} | |
| 88 Clear to end-of-line. | |
| 89 \end{funcdesc} | |
| 90 | |
| 91 \begin{funcdesc}{inverse}{onoff} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
92 Enable inverse-video mode:\ characters with the high bit set are |
| 2452 | 93 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
|
94 non-\ASCII{} character set). |
| 2452 | 95 \end{funcdesc} |
| 96 | |
| 97 \begin{funcdesc}{gotoxy}{x\, y} | |
|
2527
815dfaa6a778
small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents:
2453
diff
changeset
|
98 Set the cursor to position \code{(\var{x}, \var{y})}. |
| 2452 | 99 \end{funcdesc} |
| 100 | |
| 101 \begin{funcdesc}{hide}{} | |
| 102 Hide the window, remembering the contents. | |
| 103 \end{funcdesc} | |
| 104 | |
| 105 \begin{funcdesc}{show}{} | |
| 106 Show the window again. | |
| 107 \end{funcdesc} | |
| 108 | |
| 109 \begin{funcdesc}{echo2printer}{} | |
| 110 Copy everything written to the window to the printer as well. | |
| 111 \end{funcdesc} |
