Skip to content

Instantly share code, notes, and snippets.

@SergeyStorm
Created January 29, 2017 11:38
Show Gist options
  • Save SergeyStorm/d2f7331c657a9a7548d8facdaa8e96b6 to your computer and use it in GitHub Desktop.
Save SergeyStorm/d2f7331c657a9a7548d8facdaa8e96b6 to your computer and use it in GitHub Desktop.
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