Created
March 25, 2014 13:04
-
-
Save fredrikaverpil/9761408 to your computer and use it in GitHub Desktop.
Get subdirectory of directory #python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getSubdirs( directory ): | |
for item in os.listdir( directory ): | |
# print path to all subdirectories first. | |
if os.path.isdir( os.path.join( directory, item ) ): | |
print item |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment