本文整理汇总了Python中photo.Photo.getFileType方法的典型用法代码示例。如果您正苦于以下问题:Python Photo.getFileType方法的具体用法?Python Photo.getFileType怎么用?Python Photo.getFileType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类photo.Photo
的用法示例。
在下文中一共展示了Photo.getFileType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _testPerPhotoPage
# 需要导入模块: from photo import Photo [as 别名]
# 或者: from photo.Photo import getFileType [as 别名]
def _testPerPhotoPage(self, strip_originals):
'''
One test would be to have a page already generated, regenerate it with the
template and compare them.
'''
from photo import Photo
photo = Photo(join('data', 'fake_iphoto_library', '2005',
'03', '23','rotated_minus_90.jpg'))
prev = next = photo
dico = {}
dico['title'] = 'Youpi'
dico['width'] = str(photo.width)
dico['height'] = str(photo.height)
dico['size'] = str(photo.sizeKB)
class _datablob:
def __init__(self, **args):
self.__dict__.update(args)
infos = _datablob()
infos.model = 'le super appareil de la mort'
infos.date = 'premier janvier 2012'
infos.flash = 'flash avec les yeux rouges'
dico['exif_infos'] = infos
dico['preview'] = join('preview', 'pv_' + photo.id + photo.getFileType())
dico['preview_filename'] = basename(dico['preview'])
dico['prev'] = prev.id + '.html'
dico['prev_thumb'] = join('thumbs', 'th_' + prev.id + prev.getFileType())
dico['next'] = next.id + '.html'
dico['next_thumb'] = join('thumbs', 'th_' + next.id + next.getFileType())
original = join('photos', photo.id + photo.getFileType())
if strip_originals:
original = ''
dico['original'] = original
self._testTemplate(self.perpage, dico)