本文整理匯總了Python中Httpy.Httpy.download方法的典型用法代碼示例。如果您正苦於以下問題:Python Httpy.download方法的具體用法?Python Httpy.download怎麽用?Python Httpy.download使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Httpy.Httpy
的用法示例。
在下文中一共展示了Httpy.download方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: len
# 需要導入模塊: from Httpy import Httpy [as 別名]
# 或者: from Httpy.Httpy import download [as 別名]
im.thumbnail( (100, 100), Image.ANTIALIAS)
im.save('thumbs%s%d.jpg' % (sep, num), 'JPEG')
del im
if __name__ == '__main__':
args = argv[1:]
if len(args) == 0:
print 'argument required: image file location'
exit(1)
filename = ' '.join(args)
remove_file = False
if not path.exists(filename):
if '://' in filename:
web = Httpy()
web.download(filename, 'img.jpg')
filename = 'img.jpg'
remove_file = True
else:
print 'file not found: %s' % (filename)
exit(1)
print 'Hash:\t\t%d' % avhash(filename)
print ''
d = avhash_dict(filename)
for key in d:
print 'Hash[%s] = \t%d' % (key, d[key])
print ''
dim = dimensions(filename)