|
|
@ -9,21 +9,18 @@ |
|
|
|
# --------------------------------------------------------------------------------- |
|
|
|
# --------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
import sys |
|
|
|
import sys |
|
|
|
|
|
|
|
import os |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from admin import app, socketio |
|
|
|
|
|
|
|
import config |
|
|
|
|
|
|
|
|
|
|
|
if sys.version_info < (3, 6): |
|
|
|
if sys.version_info < (3, 6): |
|
|
|
raise RuntimeError('This application must be run under Python 3.6 or later.') |
|
|
|
raise RuntimeError('This application must be run under Python 3.6 or later.') |
|
|
|
|
|
|
|
|
|
|
|
import os |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 我们需要在sys.path中包含根目录,以确保我们可以找到在独立运行时运行时所需的一切。 |
|
|
|
# 我们需要在sys.path中包含根目录,以确保我们可以找到在独立运行时运行时所需的一切。 |
|
|
|
if sys.path[0] != os.path.dirname(os.path.realpath(__file__)): |
|
|
|
if sys.path[0] != os.path.dirname(os.path.realpath(__file__)): |
|
|
|
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) |
|
|
|
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import config |
|
|
|
|
|
|
|
from admin import app, socketio |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# print(config.DEFAULT_SERVER,config.DEFAULT_SERVER_PORT) |
|
|
|
# print(config.DEFAULT_SERVER,config.DEFAULT_SERVER_PORT) |
|
|
|
# app = create_app() |
|
|
|
# app = create_app() |
|
|
|
def main(): |
|
|
|
def main(): |
|
|
|