#NEWLINE# @ staticmethod #NEWLINE# def savePickle( obj , filename , overwrite = True , debug = False ) : #NEWLINE# #INDENT# if ( os . path . isfile ( filename ) and ( not overwrite ) ) : #NEWLINE# #INDENT# raise IOError ( ( 'File exists: ' + filename ) ) #NEWLINE# #UNINDENT# file = open ( filename , 'wb' ) #NEWLINE# pickle . dump ( obj , file ) #NEWLINE# file . close ( ) #NEWLINE# if debug : #NEWLINE# #INDENT# logging . debug ( ( ( ( 'Saved ' + filename ) + ' object type ' ) + str ( type ( obj ) ) ) )