Print Everything!
Project description
Printing everything for everyone!
- Project page:
Usage
import pyprinter
printer = pyprinter.get_printer()
# Write a simple line.
printer.write_line(printer.YELLOW + 'Hello World!')
# Or use the color functions (nested coloring is also supported).
printer.write_line(printer.yellow('Hello World!'))
# Use indentations.
with printer.group(indent=4):
printer.write_line(printer.GREEN + 'Hello Again!')
# Write aligned values.
printer.write_aligned('Awesomeness', 'Check!')
# Write titles.
printer.write_title('Wow!')
# Print human-readable file sizes.
from pyprinter import FileSize
FileSize(42352352).pretty_print()
# Use tables.
from pyprinter import Table
Table('Test', [{'1': 'a', '2': 'b', '3': 'c'}]).pretty_print()
# Integrate friendly progress bars.
import time
from pyprinter import ProgressBar
progress = ProgressBar(10)
for i in range(10):
time.sleep(1)
progress.eval(i)
progress.finish()
# Use word-wrapping or colors only.
printer = pyprinter.get_printer(colors=False, width_limit=True)
printer.write_line(printer.YELLOW + 'Hello World!')
Install
pip install pyprinter
Development
In order to build a new version, do the following:
Update version string in setup.py (in both version and download_url fields)
Update version in __init__.py file.
Run python setup.py sdist bdist_wheel to create the build
Run twine upload dist/* to upload everything to PyPi
Create a release (and tag) for the new version in GitHub (and delete the old one)
Delete old version from PyPi as well
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyprinter-1.5.3.tar.gz.
File metadata
- Download URL: pyprinter-1.5.3.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06da54f3ea3cc8e2b76ec43b4268354d38065a40b75959c9de340f353787d676
|
|
| MD5 |
066bb7950949bf5dbc5bf40298bdeeff
|
|
| BLAKE2b-256 |
3ee3a6a423b7e30c5bae9c78bec482c3f8a3320e6c54e3c23acb4ccbc4bb8ec7
|
File details
Details for the file pyprinter-1.5.3-py3-none-any.whl.
File metadata
- Download URL: pyprinter-1.5.3-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a2da268f59eae8259e0667698d10670164a86239a0ed05de579633f19b23de
|
|
| MD5 |
d0a8fae83361b0f2c51286985f2f4708
|
|
| BLAKE2b-256 |
da5334f291070efacb3bba34767fa9416095bcd142064a2a4adf69a3d3b1b9a1
|