2018年10月6日土曜日

開発環境

  • macOS Mojave - Apple
  • Emacs (Text Editor)
  • Python 3.7 (プログラミング言語)

Head First Python 第2版 ―頭とからだで覚えるPythonの基本 (Paul Barry (著)、嶋田 健志 (監修)、木下 哲也 (翻訳)、オライリージャパン)の6章(データの格納と操作 - データをファイルに格納する)、エクササイズ(p. 264)を取り組んでみる。

PythonAnywhere

入出力結果(Terminal, Jupyter(IPython))

$ python3 vsearch4web.py
 * Serving Flask app "vsearch4web" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 178-619-558
127.0.0.1 - - [06/Oct/2018 13:16:53] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:16:53] "GET /static/hf.css HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:16:56] "POST /search4 HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:17:08] "POST /search4 HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:17:24] "POST /search4 HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:17:35] "POST /search4 HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:17:40] "POST /search4 HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:17:45] "GET /search4 HTTP/1.1" 405 -
127.0.0.1 - - [06/Oct/2018 13:17:45] "GET /vsearch4 HTTP/1.1" 404 -
127.0.0.1 - - [06/Oct/2018 13:17:50] "GET /viewlog HTTP/1.1" 200 -
127.0.0.1 - - [06/Oct/2018 13:17:50] "GET /favicon.ico HTTP/1.1" 404 -
  C-c C-c$ cat vsearch.log 
ImmutableMultiDict([('phrase', 'This is a test of the posting capability'), ('letters', 'aeiou')])|127.0.0.1|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15|{'i', 'a', 'o', 'e'}
ImmutableMultiDict([('phrase', 'This is a test of the posting capability'), ('letters', 'AEIOU')])|127.0.0.1|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15|set()
ImmutableMultiDict([('phrase', 'Head First Python'), ('letters', 'aeiou')])|127.0.0.1|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15|{'i', 'a', 'o', 'e'}
ImmutableMultiDict([('phrase', 'Head First Python 2nd edition'), ('letters', 'aeiou')])|127.0.0.1|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15|{'i', 'a', 'o', 'e'}
ImmutableMultiDict([('phrase', 'Head First Python 2nd Edition'), ('letters', 'aeiou')])|127.0.0.1|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15|{'i', 'a', 'o', 'e'}
$ 

0 コメント:

コメントを投稿

関連コンテンツ