#NEWLINE# def cleanout( root ) : #NEWLINE# #INDENT# names = os . listdir ( root ) #NEWLINE# for name in names : #NEWLINE# #INDENT# fullname = os . path . join ( root , name ) #NEWLINE# if ( os . path . isdir ( fullname ) and ( not os . path . islink ( fullname ) ) ) : #NEWLINE# #INDENT# cleanout ( fullname ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# os . remove ( fullname ) #NEWLINE# #UNINDENT# #UNINDENT# os . rmdir ( root )