"""cllinecache.py: Modify linecache so it works with translated CL scripts too CL scripts have special filename "" $Id$ """ import linecache, string, os, sys from stat import * import iraf def checkcache(orig_checkcache=linecache.checkcache): """Discard cache entries that are out of date. (This is not checked upon each call!)""" # Rather than repeat linecache.checkcache code, we check & save the # CL script entries, call the original function, and then # restore the saved entries. (Modelled after Idle/PyShell.py.) cache = linecache.cache save = {} for filename in cache.keys(): if filename[:10] == "