Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kanghyojun/pyleftpad

Python version left pad
https://github.com/kanghyojun/pyleftpad

leftpad library python utility

Last synced: 24 days ago
JSON representation

Python version left pad

Awesome Lists containing this project

README

        

pyleftpad
=========

[![PyPI version](https://badge.fury.io/py/pyleftpad.svg)](https://badge.fury.io/py/pyleftpad)
[![Build Status](https://travis-ci.org/admire93/pyleftpad.svg?branch=master)](https://travis-ci.org/admire93/pyleftpad)
[![Documentation Status](https://readthedocs.org/projects/pyleftpad/badge/?version=latest)](https://pyleftpad.readthedocs.io/en/latest/?badge=latest)

Python version of [left pad][leftpad].

[leftpad]: https://www.npmjs.com/package/left-pad

## Install

```bash
$ pip install pyleftpad
```

## Usage

There are two way to use pyleftpad. First of all, you can use `leftpad()`
function from `leftpad` module in your Python script.

```python
from leftpad import leftpad

def main():
print(leftpad('hello world', 40))

main()
```

Second of all, you can use directly `leftpad` command in your shell.

```bash
$ leftpad -l 40 "hello world"
```