On Tue, Jun 9, 2009 at 4:51 PM, Zhang Huangbin<[email protected]> wrote:
> Any example?
>

#!/usr/bin/python
# -*- coding: UTF-8 -*-

import web

urls = (
        "/", "index",
        "/img", "img",
        )

app = web.application(urls, globals())

class index:
    def GET(self):
        return "<img src='/img' />"
    pass

class img:
    def GET(self):
        web.header('Content-Type', 'image/png')
        return "***BASE64 ENCODED STRING HERE***"
    pass

if __name__ == "__main__":
    app.run()

--~--~---------~--~----~------------~-------~--~----~
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