Skip to content

Instantly share code, notes, and snippets.

@haya14busa
Created September 9, 2013 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haya14busa/6496500 to your computer and use it in GitHub Desktop.
Save haya14busa/6496500 to your computer and use it in GitHub Desktop.
def getSubDirectory(path):
#return [name for name in os.listdir(path) if os.path.isdir(os.path.join(dir, name))]
f = []
for name in os.listdir(path):
if os.path.isdir(os.path.join(path, name)):
f.append(name)
return f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment