Mercurial > ift6266
view pycaptcha/simple_example.py~ @ 91:6696391273ab
Il y a maintenant une proba 0.2 d'effectuer des permutations. Cette nouvelle fonctionnalite demande un parametre non deterministe, ce qui fait que maintenant, les fonctions 'determined_by_complexity' ont ete abandonees. Le module se comporte comme un module normal
author | SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca> |
---|---|
date | Thu, 11 Feb 2010 09:15:42 -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