titus.inspector.main.InspectorMode

class titus.inspector.main.InspectorMode(initialCommands, gadgets)[source]

Bases: titus.inspector.defs.Mode

The main mode of operation for the pfainspector, which handles commands.

__init__(initialCommands, gadgets)
Parameters:
  • initialCommands (list of string) – commands to run before giving the user a prompt (they come from the pfainspector script’s arguments)
  • gadgets (list of titus.inspector.defs.Gadget) – gadgets to load at start-up
action(text)

Perform the action associated with this command.

Parameters:args (list of titus.inspector.parser.Ast) – arguments passed to the command
Return type:None
Returns:nothing; results must be printed to the screen
complete(established, active)

Handle tab-complete for this command’s arguments.

Parameters:
  • established (string) – part of the text that has been established
  • active (string) – part of the text to be completed
Return type:

list of strings

Returns:

potential completions

historyFileName = 'inspector.history'