1 Star 0 Fork 59

江北青衣 / captcha_trainer

forked from kerlomz / captcha_trainer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
exception.py 825 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Author: kerlomz <kerlomz@gmail.com>
import sys
import time
class SystemException(RuntimeError):
def __init__(self, message, code=-1):
self.message = message
self.code = code
class Error(object):
def __init__(self, message, code=-1):
self.message = message
self.code = code
print(self.message)
time.sleep(5)
sys.exit(self.code)
def exception(text, code=-1):
# raise SystemException(text, code)
Error(text, code)
class ConfigException:
SYS_CONFIG_PATH_NOT_EXIST = -4041
MODEL_CONFIG_PATH_NOT_EXIST = -4042
CHAR_SET_NOT_EXIST = -4043
CHAR_SET_INCORRECT = -4043
SAMPLE_LABEL_ERROR = -4044
GET_LABEL_REGEX_ERROR = -4045
INSUFFICIENT_SAMPLE = -5
TESTSET_SIZE_ERROR = -6
Python
1
https://gitee.com/JiangBeiQingYi/captcha_trainer.git
git@gitee.com:JiangBeiQingYi/captcha_trainer.git
JiangBeiQingYi
captcha_trainer
captcha_trainer
master

搜索帮助