view pycaptcha/simple_example.py @ 160:68160fd149fe

Simple script to doctest all modules beneath ift6266. This ecxcludes scripts since most of the files launch computations when imported and some even start a lot of jobs on the cluster (This happened to me when testing).
author Arnaud Bergeron <abergeron@gmail.com>
date Thu, 25 Feb 2010 17:27:49 -0500
parents 4775b4195b4b
children
line wrap: on
line source

#!/usr/bin/env python
#
# A very simple example that creates a random image from the
# PseudoGimpy CAPTCHA, saves and shows it, and prints the list
# of solutions. Normally you would call testSolutions rather
# than reading this list yourself.
#
from Captcha.Visual.Tests import PseudoGimpy, AngryGimpy
import numpy
#from numpy import *

#g = AngryGimpy()
#i = g.render()
#a = numpy.asarray(i)
#b = numpy.zeros((2, 2), numpy.int8)
#c = a == b
#print c
#i.save("output.png")
#i.show()
#print a
#print g.solutions