#NEWLINE# def _parse_value_in_header( header , name ) : #NEWLINE# #INDENT# 'For parsing complex header values splitted by ;\n    EX: multipart/mixed;charset=utf-8;boundary=' #NEWLINE# value = header . split ( ( '%s=' % name ) ) [ 1 ] #NEWLINE# posend = value . find ( ';' ) #NEWLINE# if ( posend == ( - 1 ) ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return value [ : posend ]