def abs__file__():
 for m in sys.modules.values():
  if hasattr(m, '__loader__'):
   continue
  try:
   m.__file__ = os.path.abspath(m.__file__)
  except (AttributeError, OSError):
   pass

def abs__file__ ( ) : for m in sys . modules . values ( ) : if hasattr ( m , '__loader__' ) : continue try : m . __file__ = os . path . abspath ( m . __file__ ) except ( AttributeError , OSError ) : pass
set all module __file__ attribute to an absolute path .