#NEWLINE# def list_dirs( path ) : #NEWLINE# #INDENT# 'Return the subdirectories in `path`.' #NEWLINE# dirpath = os . path . abspath ( path ) #NEWLINE# for filename in os . listdir ( path ) : #NEWLINE# #INDENT# fullpath = os . path . join ( dirpath , filename ) #NEWLINE# if os . path . isdir ( fullpath ) : #NEWLINE# #INDENT# ( yield path )