def parse_page(dirpath):
 (filename, msg) = read_content_file(dirpath)
 content = msg.get_payload()
 content_type = determine_page_content_type(content)
 data = {'headers': dict(msg.items()), 'content': content, 'content_type': content_type, 'filename': filename}
 return data

def parse_page ( dirpath ) : ( filename , msg ) = read_content_file ( dirpath ) content = msg . get_payload ( ) content_type = determine_page_content_type ( content ) data = { 'headers' : dict ( msg . items ( ) ) , 'content' : content , 'content_type' : content_type , 'filename' : filename } return data
parse a page given a relative file path .