A Python debugger for learner which print out all changes.
Project description
pdbg.py
Table of Contents
pdbg is a debugging tool for python. It is designed to be a simple and lightweight tool for troubleshooting errors in Python code.
When run, this tool will run the specified script, while outputting all the variable definitions during the run.
All of the functionality of this module is provided through a single function. The options for this function are detailed in the Options section of this document
Installation
You can install pdbg
with pip
pip install pdbg-bcit
Usage
Using this tool is very simple. Just open python and import the library and you'll be ready to get started.
import pdbg
pdbg.pdbg(file)
Running the pdbg.pdbg()
method will run the script and output all the variable definitions and changes in the targeted file. More options for this method are detailed below.
Options
pdbg
.pdbg(file, output_format="{var_name} {{ {pre_value} => {new_value} }}", seperator=", ", var_filter=[], func_filter=[], output_file="")
- [Required]
file
- Absolute path to your Python script.
output_format
- The format of the output
- {var_name} will be the name of the variable,
- {pre-value} will be the initial variable
- {new_value} will be the variable after changes.
- Read the Python doc for more about formatting.
seperator
- Seperator used when multiple variables are changed in one line.
var_filter
- Filter the output by variables name.
func_filter
- Filter the output by function name.
output_file
- Defaults to None. Redirect the output of pdbg to a file if specified. Will output by printing in console otherwise
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pdbg_bcit-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b59ffd1d1d81d573591fc38d73213ae06e554abcdc7e6159260e2b073c87f7da |
|
MD5 | 6cecb2156699327c3c85300c0c49b22e |
|
BLAKE2b-256 | 9a8bbda7ad542d153da089f31d5e4b5dd554c89ce864d316acf76263095c4e5b |