def input(*requireds, **defaults):
 from cStringIO import StringIO
 def dictify(fs):
  return dict([(k, fs[k]) for k in fs.keys()])
 _method = defaults.pop('_method', 'both')
 e = ctx.env.copy()
 out = {}
 if (_method.lower() in ['both', 'post']):
  a = {}
  if (e['REQUEST_METHOD'] == 'POST'):
   a = cgi.FieldStorage(fp=StringIO(data()), environ=e, keep_blank_values=1)
   a = dictify(a)
  out = dictadd(out, a)
 if (_method.lower() in ['both', 'get']):
  e['REQUEST_METHOD'] = 'GET'
  a = dictify(cgi.FieldStorage(environ=e, keep_blank_values=1))
  out = dictadd(out, a)
 try:
  return storify(out, *requireds, **defaults)
 except KeyError:
  badrequest()
  raise StopIteration

def input ( * requireds , ** defaults ) : from cStringIO import StringIO def dictify ( fs ) : return dict ( [ ( k , fs [ k ] ) for k in fs . keys ( ) ] ) _method = defaults . pop ( '_method' , 'both' ) e = ctx . env . copy ( ) out = { } if ( _method . lower ( ) in [ 'both' , 'post' ] ) : a = { } if ( e [ 'REQUEST_METHOD' ] == 'POST' ) : a = cgi . FieldStorage ( fp = StringIO ( data ( ) ) , environ = e , keep_blank_values = 1 ) a = dictify ( a ) out = dictadd ( out , a ) if ( _method . lower ( ) in [ 'both' , 'get' ] ) : e [ 'REQUEST_METHOD' ] = 'GET' a = dictify ( cgi . FieldStorage ( environ = e , keep_blank_values = 1 ) ) out = dictadd ( out , a ) try : return storify ( out , * requireds , ** defaults ) except KeyError : badrequest ( ) raise StopIteration
returns a storage object with the get and post arguments .