Created
August 19, 2012 23:16
-
-
Save seanredmond/3398448 to your computer and use it in GitHub Desktop.
Trivial Python cherrypy example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import cherrypy | |
class Greetings(object): | |
@cherrypy.expose | |
def greet(self, recipient='World'): | |
return "Hello, %s!" % (recipient) | |
if __name__ == '__main__': | |
cherrypy.quickstart(Greetings()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment