original_docstring: Remote Directory tree generator.
      
          For each directory in the remote directory tree rooted at top (including top
          itself, but excluding '.' and '..'), yields a 3-tuple
      
              dirpath, dirnames, filenames
      
          dirpath is a string, the path to the directory.  dirnames is a list of
          the names of the subdirectories in dirpath (excluding '.' and '..').
          filenames is a list of the names of the non-directory files in dirpath.
          Note that the names in the lists are just names, with no path components.
          To get a full path (which begins with top) to a file or directory in
          dirpath, do os.path.join(dirpath, name).
      
          If optional arg 'topdown' is true or not specified, the triple for a
          directory is generated before the triples for any of its subdirectories
          (directories are generated top down).  If topdown is false, the triple
          for a directory is generated after the triples for all of its
          subdirectories (directories are generated bottom up).
      
          When topdown is true, the caller can modify the dirnames list in-place
          (e.g., via del or slice assignment), and walk will only recurse into the
          subdirectories whose names remain in dirnames; this can be used to prune
          the search, or to impose a specific order of visiting.  Modifying
          dirnames when topdown is false is ineffective, since the directories in
          dirnames have already been generated by the time dirnames itself is
          generated.
      
          By default errors from the os.listdir() call are ignored.  If
          optional arg 'onerror' is specified, it should be a function; it
          will be called with one argument, an os.error instance.  It can
          report the error to continue with the walk, or raise the exception
          to abort the walk.  Note that the filename is available as the
          filename attribute of the exception object.
      
          Caution:  if you pass a relative pathname for top, don't change the
          current working directory between resumptions of walk.  walk never
          changes the current directory, and assumes that the client doesn't
          either.
      
          Example:
      
          from os.path import join, getsize
          for root, dirs, files in walk('python/Lib/email'):
              print root, "consumes",
              print sum([getsize(join(root, name)) for name in files]),
              print "bytes in", len(files), "non-directory files"
              if 'CVS' in dirs:
                  dirs.remove('CVS')  # don't visit CVS directories
          
docstring: Remote Directory tree generator.
  For each directory in the remote directory tree rooted at top (including top
  itself, but excluding '.' and '..'), yields a 3-tuple
  
  dirpath, dirnames, filenames
  
  dirpath is a string, the path to the directory.  dirnames is a list of
  the names of the subdirectories in dirpath (excluding '.' and '..').
  filenames is a list of the names of the non-directory files in dirpath.
  Note that the names in the lists are just names, with no path components.
  To get a full path (which begins with top) to a file or directory in
  dirpath, do os.path.join(dirpath, name).
  
  If optional arg 'topdown' is true or not specified, the triple for a
  directory is generated before the triples for any of its subdirectories
  (directories are generated top down).  If topdown is false, the triple
  for a directory is generated after the triples for all of its
  subdirectories (directories are generated bottom up).
  
  When topdown is true, the caller can modify the dirnames list in-place
  , and walk will only recurse into the
  subdirectories whose names remain in dirnames; this can be used to prune
  the search, or to impose a specific order of visiting.  Modifying
  dirnames when topdown is false is ineffective, since the directories in
  dirnames have already been generated by the time dirnames itself is
  generated.
  
  By default errors from the os.listdir() call are ignored.  If
  optional arg 'onerror' is specified, it should be a function; it
  will be called with one argument, an os.error instance.  It can
  report the error to continue with the walk, or raise the exception
  to abort the walk.  Note that the filename is available as the
  filename attribute of the exception object.
  
  if you pass a relative pathname for top, don't change the
  current working directory between resumptions of walk.  walk never
  changes the current directory, and assumes that the client doesn't
  either.
docstring_tokens: Remote Directory tree generator . For each directory in the remote directory tree rooted at top ( including top itself but excluding ' . ' and ' .. ' ) yields a 3 - tuple dirpath dirnames filenames dirpath is a string the path to the directory . dirnames is a list of the names of the subdirectories in dirpath ( excluding ' . ' and ' .. ' ) . filenames is a list of the names of the non - directory files in dirpath . Note that the names in the lists are just names with no path components . To get a full path ( which begins with top ) to a file or directory in dirpath do os . path . join ( dirpath name ) . If optional arg ' topdown ' is true or not specified the triple for a directory is generated before the triples for any of its subdirectories ( directories are generated top down ) . If topdown is false the triple for a directory is generated after the triples for all of its subdirectories ( directories are generated bottom up ) . When topdown is true the caller can modify the dirnames list in - place and walk will only recurse into the subdirectories whose names remain in dirnames ; this can be used to prune the search or to impose a specific order of visiting . Modifying dirnames when topdown is false is ineffective since the directories in dirnames have already been generated by the time dirnames itself is generated . By default errors from the os . listdir () call are ignored . If optional arg ' onerror ' is specified it should be a function ; it will be called with one argument an os . error instance . It can report the error to continue with the walk or raise the exception to abort the walk . Note that the filename is available as the filename attribute of the exception object . if you pass a relative pathname for top don ' t change the current working directory between resumptions of walk . walk never changes the current directory and assumes that the client doesn ' t either .
code: def os_walk(self, top, topdown=True, onerror=None):
          """Remote Directory tree generator.
      
          For each directory in the remote directory tree rooted at top (including top
          itself, but excluding '.' and '..'), yields a 3-tuple
      
              dirpath, dirnames, filenames
      
          dirpath is a string, the path to the directory.  dirnames is a list of
          the names of the subdirectories in dirpath (excluding '.' and '..').
          filenames is a list of the names of the non-directory files in dirpath.
          Note that the names in the lists are just names, with no path components.
          To get a full path (which begins with top) to a file or directory in
          dirpath, do os.path.join(dirpath, name).
      
          If optional arg 'topdown' is true or not specified, the triple for a
          directory is generated before the triples for any of its subdirectories
          (directories are generated top down).  If topdown is false, the triple
          for a directory is generated after the triples for all of its
          subdirectories (directories are generated bottom up).
      
          When topdown is true, the caller can modify the dirnames list in-place
          (e.g., via del or slice assignment), and walk will only recurse into the
          subdirectories whose names remain in dirnames; this can be used to prune
          the search, or to impose a specific order of visiting.  Modifying
          dirnames when topdown is false is ineffective, since the directories in
          dirnames have already been generated by the time dirnames itself is
          generated.
      
          By default errors from the os.listdir() call are ignored.  If
          optional arg 'onerror' is specified, it should be a function; it
          will be called with one argument, an os.error instance.  It can
          report the error to continue with the walk, or raise the exception
          to abort the walk.  Note that the filename is available as the
          filename attribute of the exception object.
      
          Caution:  if you pass a relative pathname for top, don't change the
          current working directory between resumptions of walk.  walk never
          changes the current directory, and assumes that the client doesn't
          either.
      
          Example:
      
          from os.path import join, getsize
          for root, dirs, files in walk('python/Lib/email'):
              print root, "consumes",
              print sum([getsize(join(root, name)) for name in files]),
              print "bytes in", len(files), "non-directory files"
              if 'CVS' in dirs:
                  dirs.remove('CVS')  # don't visit CVS directories
          """
      
          from posixpath import join
      
          # We may not have read permission for top, in which case we can't
          # get a list of the files the directory contains.  os.path.walk
          # always suppressed the exception then, rather than blow up for a
          # minor reason when (say) a thousand readable directories are still
          # left to visit.  That logic is copied here.
          try:
              # Note that listdir and error are globals in this module due
              # to earlier import-*.
              names = self.os_listdir(top)
          except error, err:
              if (onerror is not None) and (type(onerror) == types.FunctionType):
                  try:
                      onerror(err)
                  except:
                      pass
              return
      
          dirs, nondirs = [], []
  	if (names is not None):
  	    for name in names:
  		if self.os_isdir(join(top, name)):
  		    dirs.append(name)
  		else:
  		    nondirs.append(name)
  	
  	    if topdown:
  		yield top, dirs, nondirs
  	    for name in dirs:
  		path = join(top, name)
  		if not self.os_islink(path):
  		    for x in self.os_walk(path, topdown, onerror):
  			yield x
  	    if not topdown:
  		yield top, dirs, nondirs
  	else:
  	    print '(%s) :: Possibly no files found at "%s".' % (ObjectTypeName.objectSignature(self),top)
code_tokens: def os_walk ( self , top , topdown = True , onerror = None ) : from posixpath import join try : names = self . os_listdir ( top ) except error , err : if ( onerror is not None ) and ( type ( onerror ) == types . FunctionType ) : try : onerror ( err ) except : pass return dirs , nondirs = [ ] , [ ] if ( names is not None ) : for name in names : if self . os_isdir ( join ( top , name ) ) : dirs . append ( name ) else : nondirs . append ( name ) if topdown : yield top , dirs , nondirs for name in dirs : path = join ( top , name ) if not self . os_islink ( path ) : for x in self . os_walk ( path , topdown , onerror ) : yield x if not topdown : yield top , dirs , nondirs else : print '(%s) :: Possibly no files found at "%s".' % ( ObjectTypeName . objectSignature ( self ) , top )
short_docstring: Remote Directory tree generator.
short_docstring_tokens: Remote Directory tree generator .
comment: """Remote Directory tree generator.
      
          For each directory in the remote directory tree rooted at top (including top
          itself, but excluding '.' and '..'), yields a 3-tuple
      
              dirpath, dirnames, filenames
      
          dirpath is a string, the path to the directory.  dirnames is a list of
          the names of the subdirectories in dirpath (excluding '.' and '..').
          filenames is a list of the names of the non-directory files in dirpath.
          Note that the names in the lists are just names, with no path components.
          To get a full path (which begins with top) to a file or directory in
          dirpath, do os.path.join(dirpath, name).
      
          If optional arg 'topdown' is true or not specified, the triple for a
          directory is generated before the triples for any of its subdirectories
          (directories are generated top down).  If topdown is false, the triple
          for a directory is generated after the triples for all of its
          subdirectories (directories are generated bottom up).
      
          When topdown is true, the caller can modify the dirnames list in-place
          (e.g., via del or slice assignment), and walk will only recurse into the
          subdirectories whose names remain in dirnames; this can be used to prune
          the search, or to impose a specific order of visiting.  Modifying
          dirnames when topdown is false is ineffective, since the directories in
          dirnames have already been generated by the time dirnames itself is
          generated.
      
          By default errors from the os.listdir() call are ignored.  If
          optional arg 'onerror' is specified, it should be a function; it
          will be called with one argument, an os.error instance.  It can
          report the error to continue with the walk, or raise the exception
          to abort the walk.  Note that the filename is available as the
          filename attribute of the exception object.
      
          Caution:  if you pass a relative pathname for top, don't change the
          current working directory between resumptions of walk.  walk never
          changes the current directory, and assumes that the client doesn't
          either.
      
          Example:
      
          from os.path import join, getsize
          for root, dirs, files in walk('python/Lib/email'):
              print root, "consumes",
              print sum([getsize(join(root, name)) for name in files]),
              print "bytes in", len(files), "non-directory files"
              if 'CVS' in dirs:
                  dirs.remove('CVS')  # don't visit CVS directories
          """$SEP$# We may not have read permission for top, in which case we can't
  $SEP$# get a list of the files the directory contains.  os.path.walk
  $SEP$# always suppressed the exception then, rather than blow up for a
  $SEP$# minor reason when (say) a thousand readable directories are still
  $SEP$# left to visit.  That logic is copied here.
  $SEP$# Note that listdir and error are globals in this module due
  $SEP$# to earlier import-*.
  