#NEWLINE# def __init__( self , text , per_page , orphans = 0 , allow_empty_first_page = True ) : #NEWLINE# #INDENT# '\n        Instead of an ``object_list`` this object takes an HTML-formatted string\n        ' #NEWLINE# text = ( ( '<html><head></head><body>' + text ) + '</body></html>' ) #NEWLINE# soup = BeautifulSoup ( text ) #NEWLINE# blocks = [ unicode ( i ) for i in soup . body . childGenerator ( ) if isinstance ( text , Tag ) ] #NEWLINE# self . object_list = blocks #NEWLINE# self . per_page = per_page #NEWLINE# self . orphans = orphans #NEWLINE# self . allow_empty_first_page = allow_empty_first_page #NEWLINE# self . _num_pages = self . _count = None