def getFolders(directory):
 archive.makeDirectory(directory)
 directoryListing = []
 try:
  directoryListing = os.listdir(directory)
 except OSError:
  print 'Skeinforge can not list the directory:'
  print directory
  print 'so give it read/write permission for that directory.'
 folders = []
 for fileName in directoryListing:
  if os.path.isdir(os.path.join(directory, fileName)):
   folders.append(fileName)
 return folders

def getFolders ( directory ) : archive . makeDirectory ( directory ) directoryListing = [ ] try : directoryListing = os . listdir ( directory ) except OSError : print 'Skeinforge can not list the directory:' print directory print 'so give it read/write permission for that directory.' folders = [ ] for fileName in directoryListing : if os . path . isdir ( os . path . join ( directory , fileName ) ) : folders . append ( fileName ) return folders
get the folder list in a directory .