Module Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Import alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num Num NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr If CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Return Lambda arguments args NameParam NameParam defaults BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Str orelse Return Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Return Lambda arguments args NameParam NameParam defaults BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Str orelse Return Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Return Lambda arguments args NameParam NameParam defaults BinOpMult NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Str orelse Return Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body If CompareEq NameLoad NameLoad body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad BinOpSub NameLoad Num BinOpAdd NameLoad Num If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad Lambda arguments args NameParam defaults Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad orelse Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A __license__ Copyright (c) 2007 Will R Larson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. N/A __author__ Will R Larson N/A __email__ lethain at google's email service N/A __description__ A library for generating simple text-only captchas. N/A __api__ 

The API for a captcha is two methods:

check(answer) --> True or False
question --> either a human or html formatted string
             that represents the question being asked
 N/A __todo__ 
MissingColorCaptcha

Optionally encode questions using HTML character entitites

 N/A random BaseMathCaptcha N/A object N/A __init__ N/A N/A self qty min max str_ops N/A 2 10 30 False N/A N/A N/A self _str_ops str_ops N/A N/A self _answer None N/A N/A self _question None N/A N/A self numbers N/A N/A i N/A xrange qty N/A N/A num N/A N/A random randint min max N/A N/A N/A N/A self numbers append num N/A check N/A N/A self answer N/A N/A N/A N/A N/A self _answer None N/A N/A N/A N/A self _calculate_answer N/A N/A N/A int answer N/A self _answer N/A N/A True N/A N/A False N/A _calculate_answer N/A N/A self N/A N/A N/A op N/A N/A self _operation N/A N/A self _answer N/A reduce op N/A self numbers N/A question N/A N/A self N/A N/A N/A N/A N/A self _question None N/A N/A str_numbers N/A N/A number N/A self numbers N/A N/A N/A N/A str_numbers append N/A str number N/A op_string N/A N/A self _op_string N/A N/A self _question N/A N/A op_string join str_numbers N/A N/A self _question N/A N/A AdditionCaptcha N/A BaseMathCaptcha N/A N/A Captcha for addition problems. _operation N/A N/A self N/A N/A N/A N/A N/A N/A a b N/A N/A a b N/A _op_string N/A N/A self N/A N/A N/A N/A N/A self _str_ops True N/A N/A  plus  N/A N/A  +  N/A N/A SubtractionCaptcha N/A BaseMathCaptcha N/A N/A Captcha for subtraction problems. _operation N/A N/A self N/A N/A N/A N/A N/A N/A a b N/A N/A a b N/A _op_string N/A N/A self N/A N/A N/A N/A N/A self _str_ops True N/A N/A  minus  N/A N/A  -  N/A N/A MultiplicationCaptcha N/A BaseMathCaptcha N/A N/A Captcha for multiplication problems. _operation N/A N/A self N/A N/A N/A N/A N/A N/A a b N/A N/A a b N/A _op_string N/A N/A self N/A N/A N/A N/A N/A self _str_ops True N/A N/A  times  N/A N/A  *  N/A N/A MissingNumberCaptcha N/A object N/A __init__ N/A N/A self min max N/A 1 4 N/A N/A N/A min max N/A N/A N/A self _question N/A N/A self missing min N/A N/A N/A self missing N/A N/A random randint min max N/A numbers N/A range N/A min 1 N/A max 2 N/A N/A N/A len numbers 0 N/A N/A N/A N/A numbers remove N/A self missing N/A numbers N/A map N/A N/A N/A x N/A N/A str x numbers N/A N/A self _question N/A N/A join numbers N/A N/A N/A self _question N/A check N/A N/A self answer N/A N/A N/A N/A N/A int answer N/A self missing N/A N/A True N/A N/A False N/A question N/A N/A self N/A N/A N/A N/A self _question N/A __str__ N/A N/A self N/A N/A N/A N/A N/A self question N/A N/A