Skip to main content

Debug print statements, done right. E.g. show(x)

Project description

PyPI Package latest release PyPI Package monthly downloads Supported versions Supported implementations Wheel packaging support Test line coverage
from show import *

x = 12
nums = list(range(4))

show(x, nums)

yields:

x: 12  nums: [0, 1, 2, 3]

Output is self-labeled, so you don’t spend time doing that yourself.

Debug Printing

Logging, assertions, unit tests, and interactive debuggers are all great tools. But sometimes you just need to print values as a program runs to see what’s going on. Every language has features to print text, but they’re rarely customized for printing debugging information. show is. It provides a simple, DRY mechanism to “show what’s going on.”

Sometimes programs print so that users can see things, and sometimes they print so that develpopers can. show() is for developers, helping rapidly print the current state of variables in ways that easily indentify what value is being printed, without a lot of wasted effort. It replaces the craptastic repetitiveness of:

print "x: {0}".format(x)

with:

show(x)

If you’d like to see where the data is being produced,:

show.set(where=True)

will turn on location reporting. This can also be set on call-by-call basis.

You can also easily distinguish your debugging information from all of the normal program output. For example:

show.say.set(style='green')

Will print all of your debugging information in, you guessed it, green.

For this and much more, see the full documentation at Read the Docs.

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

show-1.1.1.zip (30.6 kB view details)

Uploaded Source

show-1.1.1.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

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

show-1.1.1-py2.py3-none-any.whl (18.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file show-1.1.1.zip.

File metadata

  • Download URL: show-1.1.1.zip
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for show-1.1.1.zip
Algorithm Hash digest
SHA256 094f2049441a720074cc35fe7c3e63d2d5f74ea9e7e3ec79a9ed8bed2528c03f
MD5 3107cd1e8209b8cd9b9d6a514cde28a7
BLAKE2b-256 f2c0139203cdbbce8be05c96b41884d853428c7adccbcfbee69be6c6704ac81c

See more details on using hashes here.

File details

Details for the file show-1.1.1.tar.gz.

File metadata

  • Download URL: show-1.1.1.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for show-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f24fa1b08c951ac0bce96dc15ac72ec3bcdf3d0663af861bc7331d32626baf8e
MD5 27581c46e2bb3c3979f330d70b2d5169
BLAKE2b-256 81eecc0b00454f740582a4d02d1aed48d2ea9bc8200d1e19d745a881459354b7

See more details on using hashes here.

File details

Details for the file show-1.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for show-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f215a4e88833322e81f3cb71f4fe464899569027b5fc9ff3862b3ca66ff1d354
MD5 3d465abcf094993d04fc11aef9d17353
BLAKE2b-256 8758d06407448173ddb724836d97e8a1f10daf33f90af043a1f9579b50bcd9b8

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