#NEWLINE# def encode( self , boundary ) : #NEWLINE# #INDENT# 'Returns the string encoding of this parameter' #NEWLINE# value = self . value #NEWLINE# if re . search ( ( '^--%s$' % re . escape ( boundary ) ) , value , re . M ) : #NEWLINE# #INDENT# raise ValueError ( 'boundary found in encoded string' ) #NEWLINE# #UNINDENT# return ( '%s%s%s' % ( self . encode_hdr ( boundary ) , value , CRLF ) )