tests/test_platypus_general.py
branchpy33
changeset 3721 0c93dd8ff567
parent 3617 ae5744e97c42
child 3794 398ea04239b5
equal deleted inserted replaced
3720:7a059dde5bf5 3721:0c93dd8ff567
   535         f = self.frame
   535         f = self.frame
   536         while len(flowables)>0 and f is self.frame:
   536         while len(flowables)>0 and f is self.frame:
   537             self.handle_flowable(flowables)
   537             self.handle_flowable(flowables)
   538 
   538 
   539     def build(self, flowables1, flowables2):
   539     def build(self, flowables1, flowables2):
   540         assert filter(lambda x: not isinstance(x,Flowable), flowables1)==[], "flowables1 argument error"
   540         assert [x for x in flowables1 if not isinstance(x,Flowable)]==[], "flowables1 argument error"
   541         assert filter(lambda x: not isinstance(x,Flowable), flowables2)==[], "flowables2 argument error"
   541         assert [x for x in flowables2 if not isinstance(x,Flowable)]==[], "flowables2 argument error"
   542         self._startBuild()
   542         self._startBuild()
   543         while (len(flowables1) > 0 or len(flowables1) > 0):
   543         while (len(flowables1) > 0 or len(flowables1) > 0):
   544             self.clean_hanging()
   544             self.clean_hanging()
   545             self.fillFrame(flowables1)
   545             self.fillFrame(flowables1)
   546             self.fillFrame(flowables2)
   546             self.fillFrame(flowables2)
   547 
   547 
   548         self._endBuild()
   548         self._endBuild()
   549 
   549 
   550 def showProgress(pageNo):
   550 def showProgress(pageNo):
   551     print 'CALLBACK SAYS: page %d' % pageNo
   551     print('CALLBACK SAYS: page %d' % pageNo)
   552 
   552 
   553 
   553 
   554 def run():
   554 def run():
   555     doc = AndyTemplate(outputfile('test_platypus_general.pdf'),subject='test0')
   555     doc = AndyTemplate(outputfile('test_platypus_general.pdf'),subject='test0')
   556     #doc.setPageCallBack(showProgress)
   556     #doc.setPageCallBack(showProgress)