diff --git a/solvable/src/demo/app.py b/solvable/src/demo/app.py index de73eee..412f1e1 100644 --- a/solvable/src/demo/app.py +++ b/solvable/src/demo/app.py @@ -5,17 +5,17 @@ from tornado.ioloop import IOLoop from sql_injection_fsm import SQLInjectionFSM from tfw.networking.server.tfw_server import TFWServer -from tfw.config import tfwenv +from tfw.config import TFWENV from tfw.config.logs import logging log = logging.getLogger(__name__) if __name__ == '__main__': server = TFWServer(SQLInjectionFSM) - server.listen(tfwenv.WEB_PORT) + server.listen(TFWENV.WEB_PORT) log.debug('Python version: {}'.format(sys.version[:5])) log.debug('Tornado version: {}'.format(tornado.version)) log.debug('ZeroMQ version: {}'.format(zmq.zmq_version())) log.debug('PyZMQ version: {}'.format(zmq.pyzmq_version())) - log.info('Tornado application listening on port {}'.format(tfwenv.WEB_PORT)) + log.info('Tornado application listening on port {}'.format(TFWENV.WEB_PORT)) IOLoop.instance().start() diff --git a/solvable/src/demo/event_handler_main.py b/solvable/src/demo/event_handler_main.py index 6cb9c8a..8e43203 100644 --- a/solvable/src/demo/event_handler_main.py +++ b/solvable/src/demo/event_handler_main.py @@ -3,13 +3,13 @@ from tornado.ioloop import IOLoop from tfw.components.source_code_event_handler import SourceCodeEventHandler from tfw.components.terminado_event_handler import TerminadoEventHandler from tfw.components.process_managing_event_handler import ProcessManagingEventHandler -from tfw.config import tfwenv +from tfw.config import TFWENV from tfw.config.logs import logging log = logging.getLogger(__name__) if __name__ == '__main__': - ide = SourceCodeEventHandler(key='webide', directory=tfwenv.WEBIDE_WD, exclude=['__pycache__']) + ide = SourceCodeEventHandler(key='webide', directory=TFWENV.WEBIDE_WD, exclude=['__pycache__']) terminado = TerminadoEventHandler(key='shell') terminado.historymonitor.subscribe_callback(callback=lambda hist: log.debug('User executed command: "{}"'.format(hist[-1]))) processmanager = ProcessManagingEventHandler(key='processmanager', dirmonitor=ide.monitor) diff --git a/solvable/src/demo/source_code_server/server.py b/solvable/src/demo/source_code_server/server.py index 91f77d2..6cc774b 100644 --- a/solvable/src/demo/source_code_server/server.py +++ b/solvable/src/demo/source_code_server/server.py @@ -2,9 +2,9 @@ import json, sys from tornado.ioloop import IOLoop from tornado.web import RequestHandler, Application -from tfw.config import tfwenv +from tfw.config import TFWENV -sys.path.append(tfwenv.WEBIDE_WD) +sys.path.append(TFWENV.WEBIDE_WD) from login_component import authorize_login @@ -23,5 +23,5 @@ class LoginHandler(RequestHandler): if __name__ == '__main__': application = Application([(r'/login', LoginHandler)]) - application.listen(tfwenv.LOGIN_APP_PORT) + application.listen(TFWENV.LOGIN_APP_PORT) IOLoop.instance().start()