nipype.utils.functions module

Handles custom functions used in Function interface. Future imports are avoided to keep namespace as clear as possible.

nipype.utils.functions.create_function_from_source(function_source, imports=None)

Return a function object from a function source

Parameters:
  • function_source (unicode string) – unicode string defining a function

  • imports (list of strings) – list of import statements in string form that allow the function to be executed in an otherwise empty namespace

nipype.utils.functions.getsource(function)

Returns the source code of a function