1 Star 0 Fork 0

黛马/GateOne

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run_gateone.py 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/python
"""
This script is meant for users that wish to run Gate One out of this (GateOne)
directory (as opposed to running setup.py). If you plan to (or already ran)
setup.py please use the 'gateone' script which gets installed in your $PATH
automatically.
"""
import os, sys
WORKING_DIR = os.path.dirname(os.path.abspath(__file__))
setup_py = os.path.join(WORKING_DIR, 'setup.py')
# Insert the path to this script's directory so that the Python interpreter can
# import gateone, termio, terminal, and onoff:
sys.path.insert(0, WORKING_DIR)
# Create the egg-info directory so entry points will work
egg_info_dir = os.path.join(WORKING_DIR, 'gateone.egg-info')
if not os.path.isdir(egg_info_dir):
try:
from commands import getstatusoutput
except ImportError: # Python 3
from subprocess import getstatusoutput
retcode, output = getstatusoutput('python %s egg_info' % setup_py)
if retcode != 0:
print(
"Error: Could not create %s. Permissions problem?" % egg_info_dir)
sys.exit(2)
from gateone.core.server import main
main(installed=False)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/amiad/GateOne.git
git@gitee.com:amiad/GateOne.git
amiad
GateOne
GateOne
master

搜索帮助