Module history :: Class HistoryManager
[show private | hide private]
[frames | no frames]

Class HistoryManager

Manager --+
          |
         HistoryManager


Manages user data history.

This manages the user input history by storing the commands the user entered. This module also handles manipulating that history letting the user to recall and edit those commands to fix mistakes they may have typed.
Method Summary
  __init__(self)
  addSession(self, newsession, basesession)
Tells the manager to create a new session based on another session. (inherited from Manager)
  clear(self, ses)
Removes everything the manager was managing--essentially reinitializes it. (inherited from Manager)
list of strings getHistory(self, count)
Returns everything in the history buffer as a list of strings
  getHistoryItem(self, userinput)
This retrieves the item (if it exists) and performs the substitutions (if we need to).
string getInfo(self, ses, text)
Returns information managed by this class. (inherited from Manager)
list of strings getState(self, ses)
Returns the state of something as a list of command strings without the command char (which is added by #write). (inherited from Manager)
string getStatus(self, ses)
Returns a one-liner status of the state of this manager for a given session. (inherited from Manager)
  recordHistory(self, input)
Records an item in the history (which is a queue).
  removeSession(self, ses)
Tells the manager to remove information regarding the session. (inherited from Manager)

Method Details

getHistory(self, count)

Returns everything in the history buffer as a list of strings
Returns:
everything in the history buffer
           (type=list of strings)

getHistoryItem(self, userinput)

This retrieves the item (if it exists) and performs the substitutions (if we need to).
Parameters:
userinput - what the user typed--we'll use this to figure out which item they're referring to and whether to apply a substitution
           (type=string)
Returns:
None if we didn't discover anything or the command string at the history index

recordHistory(self, input)

Records an item in the history (which is a queue).
Parameters:
input - the line to record
           (type=string)

Generated by Epydoc 1.1 on Mon Apr 28 21:11:25 2003 http://epydoc.sf.net