[web2py] Re: Send form submission to python script

2012-05-23 Thread pbreit
Oops. Thanks for catching. On Wednesday, May 23, 2012 3:41:51 PM UTC-7, Anthony wrote: > > def search(): >> import urllib >> q = request.args(0) >> > > That would have to be q = request.vars.q, not request.args(0). > > Anthony >

[web2py] Re: Send form submission to python script

2012-05-23 Thread Anthony
> > def search(): > import urllib > q = request.args(0) > That would have to be q = request.vars.q, not request.args(0). Anthony

[web2py] Re: Send form submission to python script

2012-05-23 Thread pbreit
I'd suggest keeping it simple. Maybe something like this: def search(): import urllib q = request.args(0) result1 = urllib.open('http://www.google.com/search?q=%s' % q) result2 = urllib.open('http://www.bing.com/search?q=%s' % q) result = result1 + result2 return dict(resul