Good. I think you'll like what I'm about to do with this one...

On 21 פברואר, 16:06, Anthony <[email protected]> wrote:
> Are you saying you want to call a web2py URL from a script and receive the
> HTML output? You should be able to do that the same way as you would any
> external URL:
>
> import urllib
> html = urllib.urlopen('http://[web2pyurl]').read()
>
> Or using the shortcut web2py fetch method:
>
> from gluon.tools import fetch
> html = fetch('http://[web2pyurl]')
>
> If you're running the script in a web2py environment (i.e., python
> web2py.py -S myapp/mycontroller -M -N -R myscript.py), you can do:
>
> html = response.render('mycontroller/myfunction.html', myfunction())
>
> Anthony
>
>
>
>
>
>
>
> On Tuesday, February 21, 2012 8:39:51 AM UTC-5, guruyaya wrote:
>
> > I'm looking for a way to create a command line script, that will
> > enable me to send all possible params for a certin request
> > (originating ip, requested app, requested controller and so on), and
> > get the HTML output (or, if possible, an object containing the full
> > response, including header options). Is there any way to achive that?
>
> > Thanks in advance:
> > Yair

Reply via email to