#NEWLINE# def save_file( req ) : #NEWLINE# #INDENT# filename = sha1 ( req [ 'body' ] ) . hexdigest ( ) #NEWLINE# filepath = get_filepath ( filename ) #NEWLINE# thefile = open ( filepath , 'w' ) #NEWLINE# thefile . write ( req [ 'body' ] ) #NEWLINE# thefile . close ( ) #NEWLINE# return filepath