indentation

Text indentation functions.


Keywords
indentation, indent, text
License
Other
Install
pip install indentation==1.0.2

Documentation

indentation

Text indentation functions.

Usage

Indenting to a specific level:

>>> import indentation
>>> indentation.set( "hello", 1 )
'    hello'

>>> indentation.set( "    hello", 0 )
'hello'

Indenting to a specific level (and keeping relative lines in place):

>>> import indentation
>>> print( indentation.set("hello\n    world", 1) )
    hello
        world