How to stop flask application without using ctrl-c

| | | | |

I want to implement a command which can stop flask application by using flask-script. I have searched the solution for a while. Because the framework doesn"t provide "app.stop()" API, I am curious about how to code this. I am working on Ubuntu 12.10 and Python 2.7.3.