Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7f8d17a5
Commit
7f8d17a5
authored
Dec 31, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general markup improvements
parent
188b2d6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Doc/lib/libcmd.tex
Doc/lib/libcmd.tex
+6
-5
No files found.
Doc/lib/libcmd.tex
View file @
7f8d17a5
...
...
@@ -11,7 +11,8 @@ line-oriented command interpreters. These are often useful for
test harnesses, administrative tools, and prototypes that will
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
interpreter framework. There is no good reason to instantiate
\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
of a completion key; it defaults to
\kbd
{
Tab
}
. If
\var
{
completekey
}
is
not
\co
de
{
None
}
and
\
module
{
readline
}
is available, command completion
not
\co
nstant
{
None
}
and
\ref
module
{
readline
}
is available, command completion
is done automatically.
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
first prompt (this overrides the
\member
{
intro
}
class member).
If the
\module
{
readline
}
module is loaded, input will automatically
If the
\
ref
module
{
readline
}
module is loaded, input will automatically
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
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;
if false,
\method
{
sys.stdout.write()
}
and
\method
{
sys.stdin.readline()
}
are used. (This means that by
importing
\module
{
readline
}
, on systems that support it, the
interpreter will automatically support
Emacs
-like line editing
importing
\
ref
module
{
readline
}
, on systems that support it, the
interpreter will automatically support
\program
{
Emacs
}
-like line editing
and command-history keystrokes.)
\end{memberdesc}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment