#NEWLINE# @ staticmethod #NEWLINE# def timestamp_file( filename ) : #NEWLINE# #INDENT# ( filepart , extensionpart ) = os . path . splitext ( filename ) #NEWLINE# backup_per_day = PathsHelper . backup_per_day #NEWLINE# backup_per_time = PathsHelper . backup_per_time #NEWLINE# if ( backup_per_day and ( backup_per_time == 'file' ) ) : #NEWLINE# #INDENT# now_date = str ( datetime . datetime . now ( ) ) #NEWLINE# time = now_date [ 11 : 19 ] . replace ( ':' , '' ) #NEWLINE# name = ( '%s_%s%s' % ( filepart , extensionpart , extensionpart ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name = ( '%s%s' % ( filepart , extensionpart ) ) #NEWLINE# #UNINDENT# return name