Mercurial Hosting > traffic-intelligence
diff python/delete-object-tables.py @ 235:584613399513
added script and functions to remove object tables
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 05 Jul 2012 23:32:14 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/delete-object-tables.py Thu Jul 05 23:32:14 2012 -0400 @@ -0,0 +1,15 @@ +#! /usr/bin/env python + +import sys,getopt + +import utils +import storage + +options, args = getopt.getopt(sys.argv[1:], 'h',['help']) +options = dict(options) + +if '--help' in options.keys() or '-h' in options.keys() or len(args) == 0: + print('Usage: {0} --help|-h <database-filename.sqlite>'.format(sys.argv[0])) + sys.exit() + +storage.removeObjectsFromSqlite(args[0])