当前位置: 首页>>代码示例>>Python>>正文


Python Page.show方法代码示例

本文整理汇总了Python中page.Page.show方法的典型用法代码示例。如果您正苦于以下问题:Python Page.show方法的具体用法?Python Page.show怎么用?Python Page.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在page.Page的用法示例。


在下文中一共展示了Page.show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ret

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import show [as 别名]
 def ret ():
     
     prevpage_callback = None
     nextpage_callback = None
     if i != 0:
         prevpage_callback = page_callbacks[i-1]
     if i+1 != len (raw_pages):
         nextpage_callback = page_callbacks[i+1]
     
     illustration_path = "test_bookpage.png"
     if i < len(illustrations):
         illustration_path = illustrations[i]
     
     page = Page (display, raw_pages[i], illustration_path, prevpage_callback, nextpage_callback)
     
     if i != 0:
         page.set_confidences ([1-float(i)/float(len(raw_pages)-1)]*page.numwords)
     
     page.show ()
开发者ID:Max-E,项目名称:CS361-Reading-App,代码行数:21,代码来源:UI_TestHarness.py

示例2: Page

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import show [as 别名]
#!/usr/bin/python

import sys
import os
from page import Page

SHOW_STEPS = True    # change this to false if you just want to see the final output for each page.
SAVE_OUTPUT = False

inputFolder = os.path.join('../images')
outputFolder = os.path.join('../output')

for filename in os.listdir(inputFolder)[:]:
#for filename in ['page332.jpg', 'page335.jpg']:
    
    inputPath = os.path.join(inputFolder, filename)
    outputPath = os.path.join(outputFolder, filename)

    page = Page(inputPath, SHOW_STEPS)
    
    if SAVE_OUTPUT:
        page.save(outputPath)  # save a copy of what is displayed. Used for getting images for the paper.
    
    page.show((800, 800))

开发者ID:chadoliver,项目名称:cosc428-structor,代码行数:26,代码来源:main.py


注:本文中的page.Page.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。