예제 #1
0
    settings.do = 'yes'
    printlog(settings.program_description)
    #Parse command line parameters
    try:
        settings.parse_command_line_args()
    except Exception as inst:
        printlog('!!! Error in command line parameters: !!!')
        printlog(inst)
        printlog('\nRun python ' + sys.argv[0] +
                 ' --help for command line options information!')
        sys.exit(-1)

    parameters = settings.parameters
    if parameters['logfile'] != '':
        start_log(
            parameters['logfile'],
            overwrite_existing=(parameters['overwrite_logfile'] == 'yes'),
            verbosity_level=parameters['verbose'])
        printlog(settings.program_description, print_enabled=False)

    printlog('Started on %s ...' % (time.strftime("%a, %d %b %Y at %H:%M:%S")))
    printlog(settings.format_parameters())

    import_metadata(settings.parameters)

    printlog('\nFinished on %s in' %
             (time.strftime("%a, %d %b %Y at %H:%M:%S")))
    toc()
    #
    printlog(settings.description_epilog)
    stop_log()
예제 #2
0
    settings.do = 'yes'
    printlog(settings.program_description)
    #Parse command line parameters
    try:
        settings.parse_command_line_args()
    except Exception as inst:
        printlog('!!! Error in command line parameters: !!!')
        printlog(inst)
        printlog('\nRun python ' + sys.argv[0] +
                 ' --help for command line options information!')
        sys.exit(-1)

    parameters = settings.parameters
    if parameters['logfile'] != '':
        start_log(
            parameters['logfile'],
            overwrite_existing=(parameters['overwrite_logfile'] == 'yes'))
        printlog(settings.program_description, print_enabled=False)

    printlog('Started on %s ...' % (time.strftime("%a, %d %b %Y at %H:%M:%S")))

    printlog(settings.format_parameters())

    view_tics(settings.parameters['dbfilename'],
              method=settings.parameters['method'],
              params=settings.parameters['params'])

    printlog('\nFinished on %s in' %
             (time.strftime("%a, %d %b %Y at %H:%M:%S")))
    toc()
    printlog(settings.description_epilog)