Skip to content

Instantly share code, notes, and snippets.

@Sanket758
Created February 4, 2020 05:29
Show Gist options
  • Save Sanket758/eb37036e38aa41c21e594c2752a84463 to your computer and use it in GitHub Desktop.
Save Sanket758/eb37036e38aa41c21e594c2752a84463 to your computer and use it in GitHub Desktop.
web.py Tutorial
import web
urls = (
'/(.*)/(.*)', 'hello'
)
render = web.template.render("resources/")
app = web.application(urls, globals())
class hello:
def GET(self, name, age):
if not name:
name = 'Sanket'
if not age:
age = 22
return render.main(name, age)
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment