#NEWLINE# def cleanup_filename( self , filename ) : #NEWLINE# #INDENT# parts = filename . split ( os . path . sep ) #NEWLINE# if ( self . filename_parts < len ( parts ) ) : #NEWLINE# #INDENT# parts = ( [ '...' ] + parts [ ( - self . filename_parts ) : ] ) #NEWLINE# #UNINDENT# return os . path . sep . join ( parts )