Ejemplo n.º 1
0
def parse(def_config):
    parser = ArgumentParser(description='Generate status line output for i3bar')
    parser.add_argument('-c', '--config', help='absolute path to the config file', default=def_config)
    args = parser.parse_args()

    if args.config:
        _config = config.config(args.config)
    else:
        parser.print_usage(file=stderr)
        exit(1)

    return _config if _config else None
Ejemplo n.º 2
0
 def _config(self):
     config_file = os.path.join(self.__work_dir, 'config.json')
     self.__config = config(config_file)
     self._check_error(self.__config)
Ejemplo n.º 3
0
 def setUp(self):
     self.cfg = config.config('/home/gott/PycharmProjects/pystatus/pystatus.ini')
Ejemplo n.º 4
0
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Date  : 2020/4/27
# @Author: Luokun
# @Email : [email protected]

import sys

from tools.config import config
from tools.trainer import Trainer

if __name__ == '__main__':
    assert len(sys.argv) >= 2
    Trainer(config(sys.argv[1])).fit()
Ejemplo n.º 5
0
from tools import common
from tools import parasechemxls
import report
import json
import os
from multiprocessing import Pool
import time
import logging
from tools.tcpclient import recvdata, senddata
from tools import config
import socket
import sys

basedir = os.path.dirname(os.path.realpath(__file__))
logger = logging.getLogger('main.sub')
config = config.config()


def run(resultfile):
    t1 = time.time()
    filename = os.path.basename(resultfile)
    filelist = list()
    xlsxname = filename.rstrip('.xlsx')
    log = common.reportlog(xlsxname)
    if not config:
        return
    if not filename.endswith('.xlsx'):
        logger.error('{}不是xlsx文件'.format(filename))
        return
    if filename.startswith('化疗'):
        resutltjson = parasechemxls.run(resultfile)