<s> from twisted . python import reflect <EOL> from zope import interface <EOL> from piped import util , processing <EOL> from piped . processors import base <EOL> class FormEncodeValidator ( base . Processor ) : <EOL> interface . classProvides ( processing . IProcessor ) <EOL> name = '<STR_LIT>' <EOL> def __init__ ( self , schema , input_path , output_path , ** kw ) : <EOL> super ( FormEncodeValidator , self ) . __init__ ( ** kw ) <EOL> self . schema = reflect . namedAny ( schema ) ( ) <EOL> self . input_path = input_path <EOL> self . output_path = output_path <EOL> def process ( self , baton ) : <EOL> input = util . dict_get_path ( baton , self . input_path ) <EOL> util . dict_set_path ( baton , self . output_path , self . schema . to_python ( input ) ) <EOL> return baton </s>
