general markup improvements
This commit is contained in:
parent
188b2d6cfa
commit
7f8d17a50c
|
@ -11,7 +11,8 @@ line-oriented command interpreters. These are often useful for
|
||||||
test harnesses, administrative tools, and prototypes that will
|
test harnesses, administrative tools, and prototypes that will
|
||||||
later be wrapped in a more sophisticated interface.
|
later be wrapped in a more sophisticated interface.
|
||||||
|
|
||||||
\begin{classdesc}{Cmd}{\optional{completekey},\optional{stdin},\optional{stdout}}
|
\begin{classdesc}{Cmd}{\optional{completekey\optional{,
|
||||||
|
stdin\optional{, stdout}}}}
|
||||||
A \class{Cmd} instance or subclass instance is a line-oriented
|
A \class{Cmd} instance or subclass instance is a line-oriented
|
||||||
interpreter framework. There is no good reason to instantiate
|
interpreter framework. There is no good reason to instantiate
|
||||||
\class{Cmd} itself; rather, it's useful as a superclass of an
|
\class{Cmd} itself; rather, it's useful as a superclass of an
|
||||||
|
@ -20,7 +21,7 @@ interpreter class you define yourself in order to inherit
|
||||||
|
|
||||||
The optional argument \var{completekey} is the \refmodule{readline} name
|
The optional argument \var{completekey} is the \refmodule{readline} name
|
||||||
of a completion key; it defaults to \kbd{Tab}. If \var{completekey} is
|
of a completion key; it defaults to \kbd{Tab}. If \var{completekey} is
|
||||||
not \code{None} and \module{readline} is available, command completion
|
not \constant{None} and \refmodule{readline} is available, command completion
|
||||||
is done automatically.
|
is done automatically.
|
||||||
|
|
||||||
The optional arguments \var{stdin} and \var{stdout} specify the
|
The optional arguments \var{stdin} and \var{stdout} specify the
|
||||||
|
@ -44,7 +45,7 @@ remainder of the line as argument.
|
||||||
The optional argument is a banner or intro string to be issued before the
|
The optional argument is a banner or intro string to be issued before the
|
||||||
first prompt (this overrides the \member{intro} class member).
|
first prompt (this overrides the \member{intro} class member).
|
||||||
|
|
||||||
If the \module{readline} module is loaded, input will automatically
|
If the \refmodule{readline} module is loaded, input will automatically
|
||||||
inherit \program{bash}-like history-list editing (e.g. \kbd{Control-P}
|
inherit \program{bash}-like history-list editing (e.g. \kbd{Control-P}
|
||||||
scrolls back to the last command, \kbd{Control-N} forward to the next
|
scrolls back to the last command, \kbd{Control-N} forward to the next
|
||||||
one, \kbd{Control-F} moves the cursor to the right non-destructively,
|
one, \kbd{Control-F} moves the cursor to the right non-destructively,
|
||||||
|
@ -184,7 +185,7 @@ A flag, defaulting to true. If true, \method{cmdloop()} uses
|
||||||
\function{raw_input()} to display a prompt and read the next command;
|
\function{raw_input()} to display a prompt and read the next command;
|
||||||
if false, \method{sys.stdout.write()} and
|
if false, \method{sys.stdout.write()} and
|
||||||
\method{sys.stdin.readline()} are used. (This means that by
|
\method{sys.stdin.readline()} are used. (This means that by
|
||||||
importing \module{readline}, on systems that support it, the
|
importing \refmodule{readline}, on systems that support it, the
|
||||||
interpreter will automatically support Emacs-like line editing
|
interpreter will automatically support \program{Emacs}-like line editing
|
||||||
and command-history keystrokes.)
|
and command-history keystrokes.)
|
||||||
\end{memberdesc}
|
\end{memberdesc}
|
||||||
|
|
Loading…
Reference in New Issue