def listRedundantModules():
 mods = {}
 for (name, mod) in sys.modules.items():
  if (not hasattr(mod, '__file__')):
   continue
  mfile = os.path.abspath(mod.__file__)
  if (mfile[(-1)] == 'c'):
   mfile = mfile[:(-1)]
  if (mfile in mods):
   print(('module at %s has 2 names: %s, %s' % (mfile, name, mods[mfile])))
  else:
   mods[mfile] = name

def listRedundantModules ( ) : mods = { } for ( name , mod ) in sys . modules . items ( ) : if ( not hasattr ( mod , '__file__' ) ) : continue mfile = os . path . abspath ( mod . __file__ ) if ( mfile [ ( - 1 ) ] == 'c' ) : mfile = mfile [ : ( - 1 ) ] if ( mfile in mods ) : print ( ( 'module at %s has 2 names: %s, %s' % ( mfile , name , mods [ mfile ] ) ) ) else : mods [ mfile ] = name
list modules that have been imported more than once via different paths .