| 1 | #!/usr/local/bin/python |
|---|
| 2 | |
|---|
| 3 | import web |
|---|
| 4 | |
|---|
| 5 | urls = ( |
|---|
| 6 | '/(.*)', 'hello' |
|---|
| 7 | ) |
|---|
| 8 | |
|---|
| 9 | class hello: |
|---|
| 10 | def GET(self, name): |
|---|
| 11 | i = web.input(times=1) |
|---|
| 12 | if not name: name = 'world' |
|---|
| 13 | for c in xrange(int(i.times)): print 'Hello,', name+'!' |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | if __name__ == "__main__": web.run(urls, globals()) |
|---|