def removeduppaths():
 L = []
 known_paths = set()
 for dir in sys.path:
  (dir, dircase) = makepath(dir)
  if (not (dircase in known_paths)):
   L.append(dir)
   known_paths.add(dircase)
 sys.path[:] = L
 return known_paths

def removeduppaths ( ) : L = [ ] known_paths = set ( ) for dir in sys . path : ( dir , dircase ) = makepath ( dir ) if ( not ( dircase in known_paths ) ) : L . append ( dir ) known_paths . add ( dircase ) sys . path [ : ] = L return known_paths
remove duplicate entries from sys .