[Python-checkins] cpython (2.7): #22613: document Cmd.cmdqueue (thanks Jacques Ducasse)

georg.brandl python-checkins at python.org
Fri Oct 31 10:43:12 CET 2014


https://hg.python.org/cpython/rev/60c6dc1b316f
changeset:   93314:60c6dc1b316f
branch:      2.7
parent:      93305:0f6dd5365370
user:        Georg Brandl <georg at python.org>
date:        Fri Oct 31 10:25:38 2014 +0100
summary:
  #22613: document Cmd.cmdqueue (thanks Jacques Ducasse)

files:
  Doc/library/cmd.rst |  9 ++++++++-
  1 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -151,9 +151,9 @@
    Hook method executed once when :meth:`cmdloop` is about to return. This method
    is a stub in :class:`Cmd`; it exists to be overridden by subclasses.
 
+
 Instances of :class:`Cmd` subclasses have some public instance variables:
 
-
 .. attribute:: Cmd.prompt
 
    The prompt issued to solicit input.
@@ -169,6 +169,13 @@
    The last nonempty command prefix seen.
 
 
+.. attribute:: Cmd.cmdqueue
+
+   A list of queued input lines.  The cmdqueue list is checked in
+   :meth:`cmdloop` when new input is needed; if it is nonempty, its elements
+   will be processed in order, as if entered at the prompt.
+
+
 .. attribute:: Cmd.intro
 
    A string to issue as an intro or banner.  May be overridden by giving the

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list