2009/7/28 Satheesh Babu Vattekkat <[email protected]>:
>
> I really love web.py. As part of my application, I have a need to
> write a script that queries the DB, get some data, make an HTML
> formatted report and mail it. One way to do this is to add a url
> mapper and a class for this purpose and then hit the url using curl or
> wget in cron.
>
> I'd prefer this to be run from a separate server and not have a web
> server front ending it. Just want to have some stuff like
>
>  python dowhatever.py
>
> and be done with that.
>
> Since I enjoy web.py, I am wondering if it is possible to do this, but
> still reuse the existing features.

Each module of web.py can used independently.

import web

db = web.database(...)
render = web.template.frender('view.html')
result = db.query(...)
print render(result)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to