Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Working on a script to query datasets without starting fluents.

This commit is contained in:
Einar Ryeng 2007-05-09 17:41:50 +00:00
parent ebe7621817
commit 7272eb63d2
1 changed files with 37 additions and 0 deletions

37
bin/dataset Executable file
View File

@ -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)