Print two outputs side-by-side, in Python
side_by_side allows users to print two multi-line outputs side-by-side. This produces an effect similar to running diff -y file1 file2 in a Unix system.
Usage
This library provides a single function, side_by_side.print_side_by_side. To print two_strings side-by-side with default settings:
from side_by_side import print_side_by_side
print_side_by_side(s1, s2)
Optional parameters
print_line_numbers (bool): If True, prints line-numbers along the left column.col_padding (int): the number of spaces to leave between the two columns (and between the text and line number, if applicable)delimiter (str): a delimiter to separate the columns
Fancy usage
Here's an example of a print format that uses all of the parameters:
from side_by_side import print_side_by_side
print_side_by_side(lorem_ipsum, lorem_ipsum, print_line_numbers=True, col_padding=24, delimiter='|++++|')
Metadata
Release files for side-by-side 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| side-by-side-0.0.2.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| side_by_side-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / side-by-side-0.0.2.tar.gz
| Download URL | side-by-side-0.0.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77789e480bec3f20935790d365095833ce4a44cc78710a2eb5e3fb98c6fef447
|
|
BLAKE2b-256 checksum How to use checksums |
2fd10eabb205d34cdb3e178d51e4be40a831d07f8e5568789304250240a06292
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
|
Release files / side_by_side-0.0.2-py3-none-any.whl
| Download URL | side_by_side-0.0.2-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4527a752052cf6d421ff90a2a1bbdbf14558246f85bb117b139dde9ad0cb20e7
|
|
BLAKE2b-256 checksum How to use checksums |
847ca27d176a82a9f59ab31e0368a477d0228ddad18f6aa3c6623247b92c7ab2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
|