Skip to content

Instantly share code, notes, and snippets.

@greut
Created February 18, 2009 08:09
Show Gist options
  • Select an option

  • Save greut/66254 to your computer and use it in GitHub Desktop.

Select an option

Save greut/66254 to your computer and use it in GitHub Desktop.
#!/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