文本索引功能。
indentation的Python项目详细描述
文本缩进函数
用法
缩进到特定级别:
>>> import indentation >>> indentation.set( "hello", 1 ) ' hello' >>> indentation.set( " hello", 0 ) 'hello'
缩进到特定级别(并保持相对行在适当位置):
>>> import indentation >>> print( indentation.set("hello\n world", 1) ) hello world