Changed the way workflows are handled. You now specify a workflow by naming the
containing python module. The module must be in python's path.
This commit is contained in:
parent
0e8d864ace
commit
ba7d8fc34f
26
bin/fluents
26
bin/fluents
|
@ -4,7 +4,7 @@ from getopt import getopt
|
|||
import os
|
||||
import sys
|
||||
from fluents import fluents, project, workflow, main
|
||||
import workflows
|
||||
#import workflows
|
||||
import cfgparse, optparse
|
||||
|
||||
PROGRAM_NAME = 'fluents'
|
||||
|
@ -50,24 +50,26 @@ def parse_options():
|
|||
return cp.parse(op)
|
||||
|
||||
if __name__ == '__main__':
|
||||
import gtk
|
||||
import gnome
|
||||
|
||||
foo = gnome.program_init(PROGRAM_NAME, VERSION)
|
||||
print foo
|
||||
|
||||
options, params = parse_options()
|
||||
|
||||
if options.list_workflows:
|
||||
list_workflows()
|
||||
sys.exit(0)
|
||||
|
||||
import gtk
|
||||
import gnome
|
||||
|
||||
gnome.program_init(PROGRAM_NAME, VERSION)
|
||||
|
||||
selected_wf = workflow.EmptyWorkflow
|
||||
|
||||
workflow_list = workflow.workflow_list()
|
||||
for wf in workflow_list:
|
||||
if wf.ident == options.workflow:
|
||||
selected_wf = wf
|
||||
selected_wf = workflow.find_workflow(options.workflow)
|
||||
print selected_wf
|
||||
if selected_wf == None: selected_wf = workflow.EmptyWorkflow
|
||||
|
||||
# workflow_list = workflow.workflow_list()
|
||||
# for wf in workflow_list:
|
||||
# if wf.ident == options.workflow:
|
||||
# selected_wf = wf
|
||||
|
||||
main.set_workflow(selected_wf())
|
||||
main.set_options(options)
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
## To be able to run fluents without installing it, we have to set
|
||||
## PYTHONPATH.
|
||||
|
||||
export PYTHONPATH=$PYTHONPATH:.
|
||||
export PYTHONPATH=$PYTHONPATH:.:./workflows
|
||||
./bin/fluents $@
|
||||
|
||||
|
|
Reference in New Issue