示例#1
0
def main(argv):
    control = make_control(argv)
    sys.stdout = Logger(control.path['out_log']
                        )  # now print statements also write to the log file
    print control
    lap = control.timer.lap

    do_work(control)

    lap('work completed')
    if control.arg.test:
        print 'DISCARD OUTPUT: test'
    # print control
    print 'done'
    return
示例#2
0
def main(argv):
    control = make_control(argv)
    sys.stdout = Logger(control.path['out_log'])  # now print statements also write to the log file
    if not control.arg.get:
        print control
        lap = control.timer.lap

    if control.arg.get:
        do_work_get(control)
    elif control.arg.analyze:
        do_work_analyze(control)
    else:
        do_work(control)

    if control.arg.get:
        sys.exit(0)

    lap('work completed')
    if control.arg.test:
        print 'DISCARD OUTPUT: test'
    # print control
    print control.arg
    print 'done'
    return