I\'m currently developing a Python application on which I want to see real-time statistics. I wanted to use Flask
in order to make it easy to use and to underst
If you are looking for accessing iPython terminal in Flask run your application in a separate thread. Try this example:
from flask import Flask
import thread
data = 'foo'
app = Flask(__name__)
@app.route("/")
def main():
return data
def flaskThread():
app.run()
if __name__ == "__main__":
thread.start_new_thread(flaskThread, ())
(Run this file in iPython)