cpython-withatomic / Doc / libmacconsole.tex

The branch 'legacy-trunk' does not exist.
\section{Built-in Module \sectcode{macconsole}}

\renewcommand{\indexsubitem}{(in module macconsole)}

This module is available on the Macintosh, provided Python has been
built using the Think C compiler. It provides an interface to the
Think console package, with which basic text windows can be created.

An object allowing you to set various options when creating windows,
see below.

Options for the \code{setmode} method. \var{C_ECHO} and \var{C_CBREAK}
enable character echo, the other two disable it, \var{C_ECHO} and
\var{C_NOECHO} enable line-oriented input (erase/kill processing,

Open a new console window. Return a console window object.

Return the console window object corresponding with the given file
object. \var{fp} should be one of \code{sys.stdin}, \code{sys.stdout} or

\subsection{macconsole options object}
These options are examined when a window is created:

\renewcommand{\indexsubitem}{(macconsole option)}
The origin of the window.

The size of the window.

The font, fontsize and fontstyle to be used in the window.

The title of the window.

If set non-zero, the window will wait for user action before closing.

\subsection{console window object}

\renewcommand{\indexsubitem}{(console window attribute)}

The file object corresponding to this console window. If the file is
buffered, you should call \code{file.flush()} between \code{write()}
and \code{read()} calls.

\renewcommand{\indexsubitem}{(console window method)}

Set the input mode of the console to \var{C_ECHO}, etc.

Set the tabsize to \var{n} spaces.

Clear to end-of-screen.

Clear to end-of-line.

Enable inverse-video mode:\ characters with the high bit set are
displayed in inverse video (this disables the upper half of a
non-\ASCII{} character set).

\begin{funcdesc}{gotoxy}{x\, y}
Set the cursor to position \code{(\var{x}, \var{y})}.

Hide the window, remembering the contents.

Show the window again.

Copy everything written to the window to the printer as well.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.