CMS 3D CMS Logo

Functions | Variables

interactivePythonTest Namespace Reference

Functions

def interactive_inspect_mode
def save_history

Variables

tuple historyPath = os.path.expanduser("~/.pyhistory")
 Load and save command line history when ## running interactively.

Function Documentation

def interactivePythonTest::interactive_inspect_mode ( )

Definition at line 9 of file interactivePythonTest.py.

00010                               :
00011     # https://stackoverflow.com/questions/640389/tell-whether-python-is-in-i-mode
00012     flagPtr = ctypes.cast(ctypes.pythonapi.Py_InteractiveFlag, 
00013                          ctypes.POINTER(ctypes.c_int))
00014     return flagPtr.contents.value > 0 or bool(os.environ.get("PYTHONINSPECT",False))
00015 

def interactivePythonTest::save_history (   historyPath = historyPath)

Definition at line 25 of file interactivePythonTest.py.

00026                                              :
00027         import readline
00028         readline.write_history_file(historyPath)
00029         if os.path.exists(historyPath):
00030             readline.read_history_file(historyPath)
00031 


Variable Documentation

tuple interactivePythonTest::historyPath = os.path.expanduser("~/.pyhistory")

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

##

Definition at line 22 of file interactivePythonTest.py.