File: _web_example6.py

package info (click to toggle)
nodebox-web 1.9.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,904 kB
  • ctags: 1,602
  • sloc: python: 7,582; ansic: 581; xml: 239; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Retrieve images from MorgueFile.

import web

q = "cloud"
img = web.morguefile.search(q)[0]

print img

# A morgueFile image in the list has 
# a number of methods and properties.
# The download() method caches the image locally 
# and returns the path to the file.
img = img.download()