All Projects → morefigs → printstack

morefigs / printstack

Licence: MIT license
printstack is a Python package that adds stack trace links to the builtin print function, so that editors such as PyCharm can link you to the source of the print call.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

printstack

pip installs

Description

printstack is a Python package that adds stack trace links to the builtin print function, so that editors such as PyCharm can link to the source of the print call.

Installation

pip install printstack

Usage

Simply import printstack to enhance the print function:

import printstack

print("Hello world")

# Hello world              File "/dev/printstack/examples/example.py", line 3, in <module>


Some options are configurable:

import printstack; printstack.set_options(
    limit=1,                        # limit depth of stack entries displayed, if limit is above zero
    right_align=40,                 # number of characters to offset the link text to the right by
    flatten_recurring_outputs=True  # display recurring outputs (e.g. from a loop) inline instead of multiline
)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].