Closed Eliazar225 closed 3 years ago
If you put your code inside a function, even if you still use with
, that'll stop it from showing you all the global variables.
You can also use variable_whitelist
which isn't documented, something like this:
import snoop
tracer = snoop()
tracer.variable_whitelist = {"x"}
with tracer:
x = 1 + 2
y = 3 + 4
print(x + y)
You helped me, Thank You!
I tried to run "with snoop" on a part of my code and it printed this in the console
I wish there's some way to filter the variables to output when using "with snoop:" so I can remove some unnecessary output such as "object variables" and "class instance"
This is the part code I run with "with snoop":
Then this is the result to the console: