calibre-web/cps.py
OzzieIsaacs cd792d0ca7 Import files are now searched first from vendor folder and not from python folder
This should solve issues if different versions of packages are installed on the machine (like in #61)
2016-10-04 18:48:26 +02:00

26 lines
618 B
Python
Executable File

#!/usr/bin/env python
import os
import sys
base_path = os.path.dirname(os.path.abspath(__file__))
# Insert local directories into path
sys.path.insert(0,os.path.join(base_path, 'vendor'))
from cps import web
from cps import config
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
global title_sort
def title_sort(title):
return title
if config.DEVELOPMENT:
web.app.run(host="0.0.0.0",port=config.PORT, debug=True)
else:
http_server = HTTPServer(WSGIContainer(web.app))
http_server.listen(config.PORT)
IOLoop.instance().start()