Mercurial Hosting > traffic-intelligence
diff scripts/safety-analysis.py @ 337:dc2e68e936c7
work in progress
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Sun, 16 Jun 2013 23:44:36 -0400 |
parents | 3950bfe22768 |
children | f3aceea2afbb |
line wrap: on
line diff
--- a/scripts/safety-analysis.py Fri Jun 14 13:47:00 2013 -0400 +++ b/scripts/safety-analysis.py Sun Jun 16 23:44:36 2013 -0400 @@ -1,27 +1,18 @@ #! /usr/bin/env python -import sys,getopt +import sys, argparse import matplotlib.pyplot as plt import numpy as np from ConfigParser import ConfigParser -options, args = getopt.getopt(sys.argv[1:], 'hi:d:t:o:f:',['help']) - -options = dict(options) - -print options, args - -if '--help' in options.keys() or '-h' in options.keys() or len(sys.argv) == 1: - print('Usage: '+sys.argv[0]+' --help|-h config_file.cfg\n' - 'The program processes indicators for all pairs of road users in the scene\n\n' - 'Order matters between positional and named arguments') - sys.exit() - +parser = argparse.ArgumentParser(description='The program processes indicators for all pairs of road users in the scene') +args = parser.parse_args() +print(args) # TODO work on the way to indicate an interaction definition -if len(args)>0: # consider there is a configuration file +if False:#len(args)>0: # consider there is a configuration file params = utils.TrackingParameters() params.loadConfigFile(args[0])