()
Set all module __file__ and __cached__ attributes to an absolute path
Set all module __file__ and __cached__ attributes to an absolute path
Set all module __file__ and __cached__ attributes to an absolute path
def abs_paths():
    """Set all module __file__ and __cached__ attributes to an absolute path"""
    for m in set(sys.modules.values()):
        if hasattr(m, '__loader__'):
            continue   # don't mess with a PEP 302-supplied __file__
        try:
            m.__file__ = os.path.abspath(m.__file__)
        except (AttributeError, OSError):
            pass
        try:
            m.__cached__ = os.path.abspath(m.__cached__)
        except (AttributeError, OSError):
            pass
def abs_paths ( ) : for m in set ( sys . modules . values ( ) ) : if hasattr ( m , '__loader__' ) : continue # don't mess with a PEP 302-supplied __file__ try : m . __file__ = os . path . abspath ( m . __file__ ) except ( AttributeError , OSError ) : pass try : m . __cached__ = os . path . abspath ( m . __cached__ ) except ( AttributeError , OSError ) : pass