alexmojaki/snoop

watch_exclude?

Closed this issue · 3 comments

watch_exclude?

???

Can we exclude a certain files?
For example, when we are running an application, snoop would also list down the internal functions of third party packages.
Suppose, application is installed in below path:
D:\projects\app_src\app.py
AND env is in path D:\python\envs\venv_1

So snoop would also list down some internal functions call stack trace.
"""
D:\python\envs\venv_1\lib\python3.8\site-packages\xyz\abc.py dummy_func1 >>> call to dummy_func1
.......................
D:\projects\app_src\app.py main_custom_func_1 >>> call to main_custom_func1
"""

So the request is, if we can ignore any other path except "D:\projects\app_src".
That way the output would contain only the custom functions and not python libraries

It's not documented, but you can do this:

import snoop.tracer

snoop.tracer.internal_directories += ("D:\\python\\envs\\venv_1",)