nipype
nipype copied to clipboard
[ENH] String Interpolation
trafficstars
Summary
It would be nice if there was an interface StringInterpolate that allowed something like the following:
interpolate = utility.StringInterpolate()
interpolate.inputs.input_string = "{greeting}, {name}!"
interpolate.inputs.greeting = "Hello"
interpolate.inputs.name = "Nipype"
res = interpolate.run()
assert res.outputs.output_string == "Hello, Nipype!"
Only input_string is required, the rest are simply added.
This is especially handy as an input to a CommandLine node, where the args are supplied by other nodes.