pytracer 0.0.4

Creator: bradpython12

Last updated:

Add to Cart

Description:

pytracer 0.0.4

# PyTracerPrints function calls of the Python program.```consolecatexample.pydeff(a):returng(a,"20")defg(a,b):returnb,af(10) pytracer example.py>example.<module>() >example.f(10) >example.g(10, '20') = ('20', 10) <example.f(10) = ('20', 10)<example.<module>() = None```## Installing ##`pip install pytracer`## Usage ## pytracer.py [-h] [-s S] [-i I] [-f F] filename ... positional arguments: filename a name of the Python program optional arguments: -h, --help show this help message and exit -s S max argument length to print (the default is 32) -i I modules to ignore (comma delimited, the default is re,glob,random,codecs,argparse) -f F modules to focus at (comma delimited)## Advanced Usage ##If you want to trace a single function just add the trace() decorator. Also it is possible to ignore not interesting subcalls:```pythonimport pytracer@pytracer.no_trace()def g(): return 42@pytracer.trace()def f(): return g()f()```The module also can be used as a context manager:```pythonimport pytracerdef f(): return 42with pytracer.trace(): f()```

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.