class labscript_utils.double_import_denier.DoubleImportDenier[source]

A module finder that tracks what’s been imported and disallows multiple imports of the same module under different names, raising an exception upon detecting that this has occured


Take a formatted traceback as returned by traceback.format_stack() and remove lines that are solely about us and the Python machinery, leaving only lines pertaining to the user’s code

_raise_error(path, name, tb, other_name, other_tb)[source]

Record the current value of sys.tracebacklimit, if any, and set a temporary sys.excepthook to restore it to that value (or delete it) after the next exception.

find_spec(fullname, path=None, target=None)[source]