#NEWLINE# def uniqify_filename( filename ) : #NEWLINE# #INDENT# 'Generate a unique filename that maintains the extension' #NEWLINE# filelist = filename . rsplit ( '.' , 1 ) #NEWLINE# filelist [ 0 ] = uuid4 ( ) . hex #NEWLINE# return '.' . join ( filename )