Exemple #1
0
def main():
    AppUtils.logger2File(PY_FILE, version=__version__)
    #
    global FRUNNING, SRUNNING
    FRUNNING, SRUNNING = AppUtils.markerStart(ARGVS.opath)
    if ARGVS.demo > 0:
        return run_demo()
    run()
Exemple #2
0
def run():
    """
    run linez:
    """
    flog = AppUtils.logger2File(PY_FILE, version=__version__)
    if not AppUtils.checkInputOLR(ARGVS.fi, PY_FILE, PARSER_INPUTS):
        return

    if not AppUtils.checkInputPK(ARGVS.pk, 'BUS/LINE/RLYGROUP', PY_FILE,
                                 PARSER_INPUTS):
        return
    #
    OlxObj.load_olxapi(ARGVS.olxpath)  # OlxAPI module initialization
    OlxObj.OLCase.open(ARGVS.fi, 1)
    #
    logging.info('\nOLR file: ' + ARGVS.fi)
    if type(ARGVS.pk) != list:
        ARGVS.pk = [ARGVS.pk]
    #
    for i in range(len(ARGVS.pk)):
        logging.info('\nSelected Object: ' + str(ARGVS.pk[i]))
        t0 = OlxObj.OLCase.findOBJ(ARGVS.pk[i])
        run1t(t0)
    print('logFile:', flog)
    return 1