original_docstring: 
      Cleanup of PATH, LD_PATH etc from entities, which points to shared file system required to reduce IO from traversing
      of python libraries
      
docstring: Cleanup of PATH, LD_PATH etc from entities, which points to shared file system required to reduce IO from traversing
  of python libraries
docstring_tokens: Cleanup of PATH LD_PATH etc from entities which points to shared file system required to reduce IO from traversing of python libraries
code: def cleanup_pathes(pathprefix="/lustre/"):
      """"
      Cleanup of PATH, LD_PATH etc from entities, which points to shared file system required to reduce IO from traversing
      of python libraries
      """
      path = os.environ['PATH'].split(':')
      for p in path[:]:
          if p.startswith("/lustre/"):
              path.remove(p)
      ppath = os.environ['PYTHONPATH'].split(':')
      for p in ppath[:]:
          if p.startswith("/lustre/"):
              ppath.remove(p)
      ldpath = os.environ['LD_LIBRARY_PATH'].split(':')
      for p in ldpath[:]:
          if p.startswith("/lustre/"):
              ldpath.remove(p)
  
      os.environ['PATH'] = ':'.join(path)
      os.putenv('PATH', ':'.join(path))
      os.environ['PYTHONPATH'] = ':'.join(ppath)
      os.putenv('PYTHONPATH', ':'.join(ppath))
      os.environ['LD_LIBRARY_PATH'] = ':'.join(ldpath)
      os.putenv('LD_LIBRARY_PATH', ':'.join(ldpath))
  
      return 0
code_tokens: def cleanup_pathes ( pathprefix = "/lustre/" ) : path = os . environ [ 'PATH' ] . split ( ':' ) for p in path [ : ] : if p . startswith ( "/lustre/" ) : path . remove ( p ) ppath = os . environ [ 'PYTHONPATH' ] . split ( ':' ) for p in ppath [ : ] : if p . startswith ( "/lustre/" ) : ppath . remove ( p ) ldpath = os . environ [ 'LD_LIBRARY_PATH' ] . split ( ':' ) for p in ldpath [ : ] : if p . startswith ( "/lustre/" ) : ldpath . remove ( p ) os . environ [ 'PATH' ] = ':' . join ( path ) os . putenv ( 'PATH' , ':' . join ( path ) ) os . environ [ 'PYTHONPATH' ] = ':' . join ( ppath ) os . putenv ( 'PYTHONPATH' , ':' . join ( ppath ) ) os . environ [ 'LD_LIBRARY_PATH' ] = ':' . join ( ldpath ) os . putenv ( 'LD_LIBRARY_PATH' , ':' . join ( ldpath ) ) return 0
short_docstring: Cleanup of PATH, LD_PATH etc from entities, which points to shared file system required to reduce IO from traversing
  of python libraries
short_docstring_tokens: Cleanup of PATH LD_PATH etc from entities which points to shared file system required to reduce IO from traversing of python libraries
comment: """"
      Cleanup of PATH, LD_PATH etc from entities, which points to shared file system required to reduce IO from traversing
      of python libraries
      """