deindent function

(Shortest import: from brian2.utils.stringtools import deindent)

brian2.utils.stringtools.deindent(text, numtabs=None, spacespertab=4, docstring=False)[source]

Returns a copy of the string with the common indentation removed.

Note that all tab characters are replaced with spacespertab spaces.

If the docstring flag is set, the first line is treated differently and is assumed to be already correctly tabulated.

If the numtabs option is given, the amount of indentation to remove is given explicitly and not the common indentation.