Return workflow output to calling script

I would like to access the output of a node from the calling script after the workflow has run. e.g

# Create Node
mynode = pe.Node(MyInterface(), name='mynode')

# Create workflow
workflow = pe.Workflow('myworkflow')

# Run workflow

# Try to access output (result) of mynode
print workflow.get_node('mynode').get_output('myoutput')  # Returns None as the result has been reset

If I step through the in debug mode, it appears that this value is temporarily stored in mynode.result but is cleared in the cleanup process. Is there anyway I can easily access it after the has completed?


eg =
for node in eg.nodes():
	if == 'mynode':
1 Like