CMS 3D CMS Logo

Functions | Variables
interactivePythonTest Namespace Reference

Functions

def interactive_inspect_mode ()
 
def save_history (historyPath=historyPath)
 

Variables

 historyPath
 Load and save command line history when ## running interactively. More...
 

Function Documentation

◆ interactive_inspect_mode()

def interactivePythonTest.interactive_inspect_mode ( )

Definition at line 10 of file interactivePythonTest.py.

11  # http://stackoverflow.com/questions/640389/tell-whether-python-is-in-i-mode
12  flagPtr = ctypes.cast(ctypes.pythonapi.Py_InteractiveFlag,
13  ctypes.POINTER(ctypes.c_int))
14  return flagPtr.contents.value > 0 or bool(os.environ.get("PYTHONINSPECT",False))
15 
16 

References electrons_cff.bool.

Referenced by save_history().

◆ save_history()

def interactivePythonTest.save_history (   historyPath = historyPath)

Definition at line 26 of file interactivePythonTest.py.

26  def save_history(historyPath=historyPath):
27  import readline
28  readline.write_history_file(historyPath)
29  if os.path.exists(historyPath):
30  readline.read_history_file(historyPath)
31 
32 

References interactive_inspect_mode(), and print().

Variable Documentation

◆ historyPath

interactivePythonTest.historyPath

Load and save command line history when ## running interactively.

##

Definition at line 23 of file interactivePythonTest.py.

electrons_cff.bool
bool
Definition: electrons_cff.py:393
interactivePythonTest.save_history
def save_history(historyPath=historyPath)
Definition: interactivePythonTest.py:26
interactivePythonTest.interactive_inspect_mode
def interactive_inspect_mode()
Definition: interactivePythonTest.py:10