Created
January 29, 2017 11:38
-
-
Save SergeyStorm/d2f7331c657a9a7548d8facdaa8e96b6 to your computer and use it in GitHub Desktop.
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
import os | |
import sys | |
d = sys.argv[1] | |
subdirs = [] | |
for o in os.listdir( d ): | |
if os.path.isdir( os.path.join( d, o )): | |
subdirs.append( os.path.join( d, o ) ) | |
if '/home' in subdirs: | |
subdirs.remove( '/home' ) | |
for subdir in subdirs: | |
print subdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment