def init():
import sys
import os
import os.path
if sys.version_info.major != 2:
sys.exit('Python 2 is required to run this program')
fdir = None
if hasattr(sys, "frozen") and \
sys.frozen in ("windows_exe", "console_exe"):
fdir = os.path.dirname(os.path.abspath(sys.executable))
sys.path.append(fdir)
fdir = os.path.join(fdir, '..')
else:
fdir = os.path.dirname(__file__)
with open(os.path.join(fdir, 'apikey.cfg')) as f:
exec(f.read())
srv = locals().get('SERVER')
from facepp import API
return API(API_KEY, API_SECRET, srv = srv)
评论列表
文章目录