This is an utility module which helps in debugging python sources with below functions
This moduled help developers in several key ways, especially when it comes to debugging and maintaining code. Here are the primary benefits:
By leveraging whoami, whereami, whocalledme, calledtree and whosdaddy, developers can create more robust, maintainable, and easier-to-debug code.
from pdbwhereami import whoami, whereami, whocalledme, calledtree, whosdaddy def debug_utility(): whoami() whoami("I am in test_whoami function") print() whereami() whereami("I am in test_whereami") whereami(obsolete_path = True) whereami(path_depth=6) print() whocalledme() whocalledme(obsolete_path = True) whocalledme(path_depth=6) print() calledtree() tstr = calledtree(verbose=False) print(tstr) calledtree(tree_depth=1) calledtree(tree_depth=2) print() whosdaddy() debug_utility()
[debug_utility] -> [debug_utility] -> I am in test_whoami function [whereami/main.py:71]:debug_utility -> [whereami/main.py:72]:debug_utility -> I am in test_whereami [/home/bhagavan/whereami/main.py:73]:debug_utility -> [/home/bhagavan/whereami/main.py:74]:debug_utility -> [whereami/main.py:93]:-> [/home/bhagavan/whereami/main.py:93]: -> [/home/bhagavan/whereami/main.py:93]: -> #1[/home/bhagavan/whereami/main.py:84]:debug_utility ] ->
pip install pdbwhereami
git clone https://github.com/bhagavansprasad/pdbwhereami.git cd pdbwhereami pip insall ./
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3