#!/usr/bin/python
import Image, ImageFont, ImageDraw
import time
import cStringIO
def generate():
fontfile = "/arialbd.ttf"
words = [ ((10, 10), time.asctime()[11:19], "#ff0000", 30)]
# A fully transparent image to work on.
im = Image.new("RGB", (135, 55), (61,43,31))
dr = ImageDraw.Draw(im)
font = ImageFont.truetype(fontfile, 30)
dr.text((10,10), time.asctime()[11:20], font=font, fill=(245,245,220))
f = cStringIO.StringIO()
im.save(f, "PNG")
print "Content-type: image/png\n"
f.seek(0)
print f.read()
if __name__ == "__main__":
generate()
Как можно указать? Пробовал и без слеша, и полный путь..