def message_from_binary_file(fp, *args, **kws):
 from email.parser import BytesParser
 return BytesParser(*args, **kws).parse(fp)

def message_from_binary_file ( fp , * args , ** kws ) : from email . parser import BytesParser return BytesParser ( * args , ** kws ) . parse ( fp )
read a binary file and parse its contents into a message object model .