ionelmc / python-hunter

Hunter is a flexible code tracing toolkit.
https://python-hunter.readthedocs.io/
BSD 2-Clause "Simplified" License
796 stars 46 forks source link

include/exclude by directory #49

Open guettli opened 5 years ago

guettli commented 5 years ago

In my virtualenv my code is installed editable in $VENV/src and framework code (django) is installed in $VENV/lib.

I tried to find a way to include/exclude lines according to the directory $VENV/src, but could not find something in the docs:

https://python-hunter.readthedocs.io/en/latest/introduction.html

Please forgive me, if I was blind.

ionelmc commented 5 years ago

All the filtering is done against instances of Event (https://python-hunter.readthedocs.io/en/latest/reference.html#hunter.event.Event). So what you're looking for is probably filename_has='/src/' or similar.