File: _web_example8.py

package info (click to toggle)
nodebox-web 1.9.2-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,724 kB
  • ctags: 1,254
  • sloc: python: 6,161; sh: 602; xml: 239; makefile: 33
file content (10 lines) | stat: -rw-r--r-- 222 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
# Definitions from the Urban Dictionary.

try:
    web = ximport("web")
except:
    web = ximport("__init__")
    reload(web)

definitions = web.urbandictionary.search("human")
text( choice(definitions), 50, 50, width=300)