From 7272eb63d22727e09a32cc5adf9ff2c6b4021bb9 Mon Sep 17 00:00:00 2001 From: einarr Date: Wed, 9 May 2007 17:41:50 +0000 Subject: [PATCH] Working on a script to query datasets without starting fluents. --- bin/dataset | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 bin/dataset diff --git a/bin/dataset b/bin/dataset new file mode 100755 index 0000000..4a64b86 --- /dev/null +++ b/bin/dataset @@ -0,0 +1,37 @@ +#!/usr/bin/python + +import os,sys +from fluents import dataset +import cfgparse, optparse + +PROGRAM_NAME = 'dataset' +VERSION = '0.1.0' + +def parse_options(): + conf_files = ['/etc/fluentsrc', + os.path.join(os.environ['HOME'], '.fluents')] + + cp = cfgparse.ConfigParser() + op = optparse.OptionParser() + + op.add_option('-i', '--info', + action='store_true', + default=False, + help='Show dataset information.') + +# op.add_option('- + + for cf in conf_files: + if os.path.isfile(cf): + cp.add_file(cf) + + return cp.parse(op) + +if __name__ == '__main__': + options, params = parse_options() + + if options.help: + print_help() + sys.exit(0) + +