File: test.py

package info (click to toggle)
python-aalib 0.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 100 kB
  • ctags: 86
  • sloc: python: 300; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import aalib
import Image
import urllib2
import aalib, urllib2, Image
from cStringIO import StringIO

screen = aalib.AnsiScreen(width=60, height=30)
fp = StringIO(urllib2.urlopen('http://python.org/favicon.ico').read())
image = Image.open(fp).convert('L').resize(screen.virtual_size)
screen.put_image((0, 0), image)
print screen.render()

# vim:ts=4 sw=4 et