Skip to main content

library can print better readable code

Project description

IPrint (indent print)

you can use easy like print but this print has indent and color that create better readable for you

Features:

  • indent data you use
  • colorize your data
  • write data with indent in file so easy

Example:

class AnotherData:
    pass
string_data = "my name is matin"
int_data = 20
another_data = AnotherData()
dict_data = {"auther": "matin ahmadi", "github": "https://github.com/matinprogrammer"}
set_data = {1, 2, 3}
list_data = [string_data, int_data, another_data, dict_data, set_data, [[["test list"]]]]

>>> iprint(list_data)

Screenshot of example code of iprint

>>> cprint(list_data)

Screenshot of example code of iprint

how to install

pip install indent-print

how to use

iprint() for indent print

cprint() for indent and colorize print

>>> from iprint import iprint, cprint

>>> iprint(anydata)
>>> cprint(anydata)

customize

custom indent length

default indent is 4(its mean 4 white space)

>>> iprint([1], indent=8)
[
        1
]

write in file

NOTE: cprint hasn't got file parameter(cant write colorize text in file)

>>> with open(test.txt, "w") as test_file:
        iprint(mydata, file=test_file)

change seperator of input data

default seperator is " "(white space)

>>> iprint(1, 2, 3, sep="-")
1-2-3

change end character

default seperator is "\n"(new line)

>>> iprint(1, 2, 3, end="*")
1 2 3*

Project details


Download files

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

Source Distribution

indent_print-1.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

indent_print-1.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file indent_print-1.1.0.tar.gz.

File metadata

  • Download URL: indent_print-1.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for indent_print-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1244dcc793f5564d7ef4a4731a9876df5c571cf110c9b7214ce7bf50c2ca9407
MD5 39984b3023133a423a4d6bb7f26bcd34
BLAKE2b-256 c3c23ada4863fd3738072ddd7ca4dacae4a4b222769f8b397e69b5cb5fb67148

See more details on using hashes here.

File details

Details for the file indent_print-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: indent_print-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for indent_print-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d29fcffa4bfd3c02ef7a3a99f6efc5d3d88d982f61c0883b506a69ebaffcc014
MD5 3e8bd4daf114b2eb2e4482e7992bc2df
BLAKE2b-256 e6c0f8ddb1284877f2bb5a737f0fcd33bc79bf0711b33f59fd3c22ce2f3a7909

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page