def walk_with_symlinks(top, func, arg):
 try:
  names = os.listdir(top)
 except os.error:
  return
 func(arg, top, names)
 exceptions = ('.', '..')
 for name in names:
  if (name not in exceptions):
   name = os.path.join(top, name)
   if os.path.isdir(name):
    walk_with_symlinks(name, func, arg)

def walk_with_symlinks ( top , func , arg ) : try : names = os . listdir ( top ) except os . error : return func ( arg , top , names ) exceptions = ( '.' , '..' ) for name in names : if ( name not in exceptions ) : name = os . path . join ( top , name ) if os . path . isdir ( name ) : walk_with_symlinks ( name , func , arg )
like os .