Skip to main content

Text indentation functions.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for indentation, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size indentation-1.0.2.tar.gz (1.5 kB) File type Source Python version None Upload date Hashes View
Filename, size indentation-1.0.2-py2-none-any.whl (2.5 kB) File type Wheel Python version 2.7 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page