Skip to main content

A simple function that will help you with debugging.

Project description

simple-print

A simple function that will help you with debugging.

https://github.com/Sobolev5/simple-print

How to use it

To install run:

pip install simple-print

Add the following line at the top of your file:

from simple_print import sprint 

And simple print your variables:

master = "yoda"
sprint(master)    
sprint(master, c="red") # colors: grey, red, green, yellow, blue, magenta, cyan, white. 
sprint(master, c="red", b="on_white") # backgrounds: on_grey, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan
sprint(master, c="blue", b="on_white", a="bold") # attributes: bold, dark, underline, blink, reverse, concealed
sprint(f"master {master}", c="white", b="on_red", a="bold", s=True) # for f strings (any strings)
sprint(master, c="red", b="on_white", a="bold", p=True) # with full path to file
my_string = sprint(master, r=True) # return as string
my_string = sprint(master, r=True, p=True) # return as string with path

Open your development console and see the result:

Test

pytest -s

Production

Stop printing (for production):

export DEBUG=False

P.S.

Try my free service for developers Workhours.space. It's time tracker with simple interface, powerful functionality such as automatic payroll calculation, telegram bot timer, easy web2 and web3 auth and more. Enjoy.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

simple_print-1.1.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

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