SHARE
TWEET

Untitled

a guest Dec 5th, 2012 37 Never
  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)
RAW Paste Data
Top