■コード確認
[root@entaku19890818 ~]# cat prime.py
#coding: UTF-8
from bottle import route,template,run
@route('/prime')
def prime():
MAX = 10000
LIST = range(2, MAX + 1)
for i in range(2, int(MAX ** 0.5)):
LIST = [x for x in LIST if (x == i or x % i != 0)]
for j in LIST:
print j
run(host='www.entaku19890818.com', port=8080)
■実行
[root@entaku19890818 ~]# python prime.py
Bottle v0.13-dev server starting up (using WSGIRefServer())...
Listening on http://www.entaku19890818.com:8080/
Hit Ctrl-C to quit.
2
3
5
7
11
13
17
19
23
29
31
37
41
43
47
53
59
61
67
71
73
79
83
89
97
42.146.144.127 - - [05/May/2015 12:58:58] "GET /prime HTTP/1.1" 200 0
ホントはWebに表示したいんだけどなー