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 24 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 31 of file AtlCoolConsole.py.

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

Member Function Documentation

◆ init_history()

def AtlCoolConsole.HistoryConsole.init_history (   self,
  histfile 
)

Definition at line 38 of file AtlCoolConsole.py.

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

◆ save_history()

def AtlCoolConsole.HistoryConsole.save_history (   self,
  histfile 
)

Definition at line 48 of file AtlCoolConsole.py.

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

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