Created
February 18, 2009 08:09
-
-
Save greut/66254 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| # -*- coding: utf-8 -*- | |
| from wsgiref.simple_server import make_server | |
| from restish import app, http, resource | |
| PORT = 8080 | |
| def unicode_found(request): | |
| return http.found(u"http://en.wikipedia.org/wiki/£") | |
| application = app.RestishApp(unicode_found) | |
| if __name__ == "__main__": | |
| server = make_server('', PORT, application) | |
| try: | |
| print "serving you from port: %d" % PORT | |
| server.serve_forever() | |
| except KeyboardInterrupt, ki: | |
| print "bye bye" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment