當前位置: 首頁>>代碼示例>>Python>>正文


Python docpy.PdfDocBuilder0類代碼示例

本文整理匯總了Python中docpy.PdfDocBuilder0的典型用法代碼示例。如果您正苦於以下問題:Python PdfDocBuilder0類的具體用法?Python PdfDocBuilder0怎麽用?Python PdfDocBuilder0使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PdfDocBuilder0類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: endClass

    def endClass(self, name, doc, bases):
        "Append a graphic demo of a Widget or Drawing at the end of a class."

        PdfDocBuilder0.endClass(self, name, doc, bases)

        aClass = eval('self.skeleton.moduleSpace.' + name)
        if hasattr(aClass, '_nodoc'):
            pass
        elif issubclass(aClass, Widget):
            try:
                widget = aClass()
            except AssertionError as err:
                if _abstractclasserr_re.match(str(err)): return
                raise
            self.story.append(Spacer(0*cm, 0.5*cm))
            self._showWidgetDemoCode(widget)
            self.story.append(Spacer(0*cm, 0.5*cm))
            self._showWidgetDemo(widget)
            self.story.append(Spacer(0*cm, 0.5*cm))
            self._showWidgetProperties(widget)
            self.story.append(PageBreak())
        elif issubclass(aClass, Drawing):
            drawing = aClass()
            self.story.append(Spacer(0*cm, 0.5*cm))
            self._showDrawingCode(drawing)
            self.story.append(Spacer(0*cm, 0.5*cm))
            self._showDrawingDemo(drawing)
            self.story.append(Spacer(0*cm, 0.5*cm))
開發者ID:Distrotech,項目名稱:reportlab,代碼行數:28,代碼來源:graphdocpy.py

示例2: beginClass

    def beginClass(self, name, doc, bases):
        "Append a graphic demo of a Widget or Drawing at the end of a class."

        if VERBOSE:
            print('GraphPdfDocBuilder.beginClass(%s...)' % name)

        aClass = eval('self.skeleton.moduleSpace.' + name)
        if issubclass(aClass, Widget):
            if self.shouldDisplayModule:
                modName, modDoc, imported = self.shouldDisplayModule
                self.story.append(Paragraph(modName, self.makeHeadingStyle(self.indentLevel-2, 'module')))
                self.story.append(XPreformatted(modDoc, self.bt))
                self.shouldDisplayModule = 0
                self.hasDisplayedModule = 1
                if self.shouldDisplayClasses:
                    self.story.append(Paragraph('Classes', self.makeHeadingStyle(self.indentLevel-1)))
                    self.shouldDisplayClasses = 0
            PdfDocBuilder0.beginClass(self, name, doc, bases)
            self.beginAttributes(aClass)

        elif issubclass(aClass, Drawing):
            if self.shouldDisplayModule:
                modName, modDoc, imported = self.shouldDisplayModule
                self.story.append(Paragraph(modName, self.makeHeadingStyle(self.indentLevel-2, 'module')))
                self.story.append(XPreformatted(modDoc, self.bt))
                self.shouldDisplayModule = 0
                self.hasDisplayedModule = 1
                if self.shouldDisplayClasses:
                    self.story.append(Paragraph('Classes', self.makeHeadingStyle(self.indentLevel-1)))
                    self.shouldDisplayClasses = 0
            PdfDocBuilder0.beginClass(self, name, doc, bases)
開發者ID:Distrotech,項目名稱:reportlab,代碼行數:31,代碼來源:graphdocpy.py

示例3: endFunction

    def endFunction(self, name, doc, sig):
        "Append a drawing to the story for special function names."

        if name[:6] != 'sample':
            return

        if VERBOSE:
            print('GraphPdfDocBuilder.endFunction(%s...)' % name)
        PdfDocBuilder0.endFunction(self, name, doc, sig)
        aFunc = eval('self.skeleton.moduleSpace.' + name)
        drawing = aFunc()

        self.story.append(Spacer(0*cm, 0.5*cm))
        self._showFunctionDemoCode(aFunc)
        self.story.append(Spacer(0*cm, 0.5*cm))
        self._showDrawingDemo(drawing)

        self.story.append(PageBreak())
開發者ID:Distrotech,項目名稱:reportlab,代碼行數:18,代碼來源:graphdocpy.py

示例4: beginFunction

    def beginFunction(self, name, doc, sig):
        "Skip function for 'uninteresting' names."

        if name[:6] == 'sample':
            PdfDocBuilder0.beginFunction(self, name, doc, sig)
開發者ID:Distrotech,項目名稱:reportlab,代碼行數:5,代碼來源:graphdocpy.py

示例5: beginFunctions

 def beginFunctions(self, names):
     srch = ' '.join(names)
     if ' '.join(names).find(' sample') > -1:
         PdfDocBuilder0.beginFunctions(self, names)
開發者ID:Distrotech,項目名稱:reportlab,代碼行數:4,代碼來源:graphdocpy.py

示例6: beginFunctions

 def beginFunctions(self, names):
     srch = string.join(names, " ")
     if string.find(string.join(names, " "), " sample") > -1:
         PdfDocBuilder0.beginFunctions(self, names)
開發者ID:sengupta,項目名稱:scilab_cloud,代碼行數:4,代碼來源:graphdocpy.py


注:本文中的docpy.PdfDocBuilder0類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。