Skip to main content

A small debug printing module that prints extra info like filenames, function names, and line numbers. It can also recursively print lists, tuples, and dicts.

Project description

A small debug printing module that prints extra info like filenames, function names, and line numbers. It can also recursively print objects such as lists, tuples, and dicts.

More useful stuff may be added in the future.

Example Usage:

from printdebug import printdebug, printobject
def myfunction():
    printdebug('Hello from myfunction.')

myfunction()

# Output:
#   myfile.py line #3 in myfunction: Hello from myfunction.

o = {'key1': {'subkey1': 'value1', 'subkey2': 'value2'}}
printobject(o)

# Output:
#    key1:
#        subkey1:
#            value1
#        subkey2:
#            value2

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

PrintDebug-0.0.5-1.tar.gz (16.0 kB view hashes)

Uploaded Source

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