annotate python/delete-object-tables.py @ 285:5957aa1d69e1

Integrating Mohamed's changes Changed the indicator interface to access values, so that the generic LCSS implementation can be used
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sat, 26 Jan 2013 19:02:25 -0500
parents 584613399513
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
235
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
1 #! /usr/bin/env python
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
2
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
3 import sys,getopt
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
4
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
5 import utils
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
6 import storage
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
7
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
8 options, args = getopt.getopt(sys.argv[1:], 'h',['help'])
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
9 options = dict(options)
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
10
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
11 if '--help' in options.keys() or '-h' in options.keys() or len(args) == 0:
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
12 print('Usage: {0} --help|-h <database-filename.sqlite>'.format(sys.argv[0]))
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
13 sys.exit()
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
14
584613399513 added script and functions to remove object tables
Nicolas Saunier <nicolas.saunier@polymtl.ca>
parents:
diff changeset
15 storage.removeObjectsFromSqlite(args[0])