From aa19e3b9c9f03f7320c2d5470fa977ed0bbdeeab Mon Sep 17 00:00:00 2001 From: Zearin Date: Wed, 5 Oct 2011 17:05:31 -0400 Subject: Initial import. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copy of the Python module cmd2 by Catherine Devlin. Note that this is NOT the official copy (it’s at http://www.assembla.com/spaces/python-cmd2/wiki ). I’d rather just work using git + GitHub instead of hg + Assembla. ☺ OTOH, I fully intend to submit changes back to the official repo on Assembla—so don’t be shy, fork away. I’m happy for any help! --- doxygen/html/classcmd2_1_1_history.html | 418 ++++++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) create mode 100644 doxygen/html/classcmd2_1_1_history.html (limited to 'doxygen/html/classcmd2_1_1_history.html') diff --git a/doxygen/html/classcmd2_1_1_history.html b/doxygen/html/classcmd2_1_1_history.html new file mode 100644 index 0000000..903c640 --- /dev/null +++ b/doxygen/html/classcmd2_1_1_history.html @@ -0,0 +1,418 @@ + + + + +Cmd2: cmd2::History Class Reference + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + +
+
Cmd2 + +
+ +
+
+ + + + + +
+
+ +
+
+
+ +
+
+ +
+
cmd2::History Class Reference
+
+
+ +

List of all members.

+ + + + + + + + + + + + +

+Public Member Functions

def zero_based_index
def to_index
def search
def span
def append
def extend
def get

+Static Public Attributes

tuple spanpattern = re.compile(r'^\s*(?P<start>\-?\d+)?\s*(?P<separator>:|(\.{2,}))?\s*(?P<end>\-?\d+)?\s*$')
tuple rangePattern = re.compile(r'^\s*(?P<start>[\d]+)?\s*\-\s*(?P<end>[\d]+)?\s*$')
+

Detailed Description

+
A list of HistoryItems that knows how to respond to user requests.
+>>> h = History([HistoryItem('first'), HistoryItem('second'), HistoryItem('third'), HistoryItem('fourth')])
+>>> h.span('-2..')
+['third', 'fourth']
+>>> h.span('2..3')
+['second', 'third']
+>>> h.span('3')
+['third']    
+>>> h.span(':')
+['first', 'second', 'third', 'fourth']
+>>> h.span('2..')
+['second', 'third', 'fourth']
+>>> h.span('-1')
+['fourth']    
+>>> h.span('-2..-3')
+['third', 'second']      
+>>> h.search('o')
+['second', 'fourth']
+>>> h.search('/IR/')
+['first', 'third']
+
+

Definition at line 1304 of file cmd2.py.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
def cmd2::History::append ( self,
 new 
)
+
+
+ +

Definition at line 1368 of file cmd2.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def cmd2::History::extend ( self,
 new 
)
+
+
+ +

Definition at line 1372 of file cmd2.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def cmd2::History::get ( self,
 getme = None,
 fromEnd = False 
)
+
+
+ +

Definition at line 1376 of file cmd2.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def cmd2::History::search ( self,
 target 
)
+
+
+ +

Definition at line 1337 of file cmd2.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def cmd2::History::span ( self,
 raw 
)
+
+
+ +

Definition at line 1346 of file cmd2.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def cmd2::History::to_index ( self,
 raw 
)
+
+
+ +

Definition at line 1331 of file cmd2.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def cmd2::History::zero_based_index ( self,
 onebased 
)
+
+
+ +

Definition at line 1326 of file cmd2.py.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
tuple cmd2::History::rangePattern = re.compile(r'^\s*(?P<start>[\d]+)?\s*\-\s*(?P<end>[\d]+)?\s*$') [static]
+
+
+ +

Definition at line 1367 of file cmd2.py.

+ +
+
+ +
+
+ + + + +
tuple cmd2::History::spanpattern = re.compile(r'^\s*(?P<start>\-?\d+)?\s*(?P<separator>:|(\.{2,}))?\s*(?P<end>\-?\d+)?\s*$') [static]
+
+
+ +

Definition at line 1345 of file cmd2.py.

+ +
+
+
The documentation for this class was generated from the following file:
    +
  • /Users/amrogers/Developer/Projects/cmd2/cmd2.py
  • +
+
+
+ + + + + -- cgit v1.2.1