Skip to content

Commit 4c1f6ec

Browse files
committed
imports
1 parent 1d8cdee commit 4c1f6ec

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

tornado/web/Web.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env python
22

3-
import sys, os, signal, logging, logging.handlers
4-
53
import tornado.httpserver
64
import tornado.ioloop
75
import tornado.options
@@ -14,11 +12,13 @@
1412
from utils import *
1513
from handlers import *
1614

15+
import sys, os, signal, logging, logging.handlers
16+
1717
define("port", default=8888, type=int)
1818
define("syslog", default=False, type=bool)
1919

2020
# curl -v http://localhost:8888/;echo
21-
# python Web.py --logging=debug
21+
# python -B Web.py --logging=debug
2222

2323
class WebApplication(tornado.web.Application):
2424
def __init__(self, **kwargs):

tornado/web/handlers/Index.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
import time
2-
3-
try:
4-
from tornado.web import RequestHandler
5-
from tornado.template import Template, ParseError
6-
from tornado.escape import json_encode, json_decode
7-
except ImportError as ierror:
8-
import sys
9-
sys.exit('Tornado required: http://www.tornadoweb.org/')
1+
from tornado.web import RequestHandler
2+
from tornado.template import Template
3+
from tornado.escape import json_encode, json_decode
104

5+
import time
116
from utils import *
127

138
class IndexHandler(RequestHandler):

0 commit comments

Comments
 (0)