(env) c:\cap_work\svn_repowc\work>cd helloworld
(env) c:\cap_work\svn_repowc\work\helloworld>dir
Volume in drive C has no label.
Volume Serial Number is D82E-817D
Directory of c:\cap_work\svn_repowc\work\helloworld
01-12-2016 11:40 <DIR> .
01-12-2016 11:40 <DIR> ..
01-12-2016 11:40 153 hello.py
1 File(s) 153 bytes
2 Dir(s) 71,678,545,920 bytes free
(env) c:\cap_work\svn_repowc\work\helloworld>python hello.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [01/Dec/2016 11:42:52] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [01/Dec/2016 11:42:52] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [01/Dec/2016 11:42:52] "GET /favicon.ico HTTP/1.1" 404 -
==================
hello.py
==================
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "hellow world!"
if __name__ == "__main__":
app.run()
and save as hello.py
(env) c:\cap_work\svn_repowc\work\helloworld>dir
Volume in drive C has no label.
Volume Serial Number is D82E-817D
Directory of c:\cap_work\svn_repowc\work\helloworld
01-12-2016 11:40 <DIR> .
01-12-2016 11:40 <DIR> ..
01-12-2016 11:40 153 hello.py
1 File(s) 153 bytes
2 Dir(s) 71,678,545,920 bytes free
(env) c:\cap_work\svn_repowc\work\helloworld>python hello.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [01/Dec/2016 11:42:52] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [01/Dec/2016 11:42:52] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [01/Dec/2016 11:42:52] "GET /favicon.ico HTTP/1.1" 404 -
==================
hello.py
==================
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "hellow world!"
if __name__ == "__main__":
app.run()
and save as hello.py
No comments:
Post a Comment