Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 5th, 2012  |  syntax: Python  |  size: 0.25 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from flask import Flask
  2.  
  3. app = Flask(__name__)
  4.  
  5. view_maker = lambda name: (lambda: name)
  6. for name in ('/hi', '/bye'):
  7.     app.add_url_rule(name, view_func=view_maker(name))
  8.  
  9. if __name__ == '__main__':
  10.         app.run(host='0.0.0.0', port=9113, debug=True)
clone this paste RAW Paste Data