ATLAS Offline Software
Public Member Functions | List of all members
AtlCoolConsole.HistoryConsole Class Reference
Inheritance diagram for AtlCoolConsole.HistoryConsole:
Collaboration diagram for AtlCoolConsole.HistoryConsole:

Public Member Functions

def __init__ (self, locals=None, filename="<console>", histfile=os.path.join(os.environ["HOME"], historyFile))
 
def init_history (self, histfile)
 
def save_history (self, histfile)
 

Detailed Description

This class extends InteractiveConsole with command line history. The
history can be accessed with the usual CURSOR UP keystroke. It is also
stored to a file '%s' in the user's home directory.

Definition at line 25 of file AtlCoolConsole.py.

Constructor & Destructor Documentation

◆ __init__()

def AtlCoolConsole.HistoryConsole.__init__ (   self,
  locals = None,
  filename = "<console>",
  histfile = os.path.join( os.environ["HOME"], historyFile) 
)

Definition at line 32 of file AtlCoolConsole.py.

32  def __init__( self,
33  locals = None,
34  filename = "<console>",
35  histfile = os.path.join( os.environ["HOME"], historyFile) ):
36  code.InteractiveConsole.__init__( self )
37  self.init_history( histfile )
38 

Member Function Documentation

◆ init_history()

def AtlCoolConsole.HistoryConsole.init_history (   self,
  histfile 
)

Definition at line 39 of file AtlCoolConsole.py.

39  def init_history( self, histfile ):
40  readline.parse_and_bind( "tab: complete" )
41  readline.set_history_length( 100 )
42  if hasattr( readline, "read_history_file" ):
43  try:
44  readline.read_history_file( histfile )
45  except IOError:
46  pass
47  atexit.register( self.save_history, histfile )
48 

◆ save_history()

def AtlCoolConsole.HistoryConsole.save_history (   self,
  histfile 
)

Definition at line 49 of file AtlCoolConsole.py.

49  def save_history( self, histfile ):
50  readline.write_history_file( histfile )
51 
52 
53 

The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18