diff python/safety-analysis.py @ 333:c9201f6b143a

moved the config parser to utils
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 14 Jun 2013 10:25:00 -0400
parents 5e43b7389c25
children
line wrap: on
line diff
--- a/python/safety-analysis.py	Fri Jun 14 09:53:32 2013 -0400
+++ b/python/safety-analysis.py	Fri Jun 14 10:25:00 2013 -0400
@@ -22,12 +22,8 @@
 # TODO work on the way to indicate an interaction definition
 
 if len(args)>0: # consider there is a configuration file
-    config = ConfigParser()
-    config.readfp(FakeSecHead(open(args[0])))
-    sectionHeader = config.sections()[0]
-    videoFilename = config.get(sectionHeader, 'video-filename')
-    databaseFilename = config.get(sectionHeader, 'database-filename')
-    homography = inv(loadtxt(config.get(sectionHeader, 'homography-filename')))
-    firstFrameNum = config.getint(sectionHeader, 'frame1')
+    params = utils.TrackingParameters()
+    params.loadConfigFile(args[0])
+