diff --git a/bin/fluents b/bin/fluents index 98a4b67..7bda116 100755 --- a/bin/fluents +++ b/bin/fluents @@ -31,6 +31,8 @@ def parse_options(): cp.add_option('datadir', type='string', default=os.environ['HOME']) + cp.add_option('workflowdir', type='string', + default='workflows') cp.parse() op = optparse.OptionParser() @@ -53,15 +55,16 @@ if __name__ == '__main__': import gtk import gnome - foo = gnome.program_init(PROGRAM_NAME, VERSION) - print foo + gnome.program_init(PROGRAM_NAME, VERSION) options, params = parse_options() + main.options = options if options.list_workflows: list_workflows() sys.exit(0) + print "options.workflow:", options.workflow selected_wf = workflow.find_workflow(options.workflow) print selected_wf if selected_wf == None: selected_wf = workflow.EmptyWorkflow diff --git a/fluents/workflow.py b/fluents/workflow.py index 07c9e95..bb42cbc 100644 --- a/fluents/workflow.py +++ b/fluents/workflow.py @@ -51,7 +51,7 @@ def find_workflow(basename): print "find_workflow" # List all .py files that can contain workflow classes - wf_path = sys.path + wf_path = main.options.workflowdir.split(';') wf_file = None for dir in wf_path: