def expand_paths(inputs):
 seen = {}
 for dirname in inputs:
  dirname = normalize_path(dirname)
  if (dirname in seen):
   continue
  seen[dirname] = 1
  if (not os.path.isdir(dirname)):
   continue
  files = os.listdir(dirname)
  (yield (dirname, files))
  for name in files:
   if (not name.endswith('.pth')):
    continue
   if (name in ('easy-install.pth', 'setuptools.pth')):
    continue
   f = open(os.path.join(dirname, name))
   lines = list(yield_lines(f))
   f.close()
   for line in lines:
    if (not line.startswith('import')):
     line = normalize_path(line.rstrip())
     if (line not in seen):
      seen[line] = 1
      if (not os.path.isdir(line)):
       continue
      (yield (line, os.listdir(line)))

def expand_paths ( inputs ) : seen = { } for dirname in inputs : dirname = normalize_path ( dirname ) if ( dirname in seen ) : continue seen [ dirname ] = 1 if ( not os . path . isdir ( dirname ) ) : continue files = os . listdir ( dirname ) ( yield ( dirname , files ) ) for name in files : if ( not name . endswith ( '.pth' ) ) : continue if ( name in ( 'easy-install.pth' , 'setuptools.pth' ) ) : continue f = open ( os . path . join ( dirname , name ) ) lines = list ( yield_lines ( f ) ) f . close ( ) for line in lines : if ( not line . startswith ( 'import' ) ) : line = normalize_path ( line . rstrip ( ) ) if ( line not in seen ) : seen [ line ] = 1 if ( not os . path . isdir ( line ) ) : continue ( yield ( line , os . listdir ( line ) ) )
yield sys .