Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def f4(x4):
result4 = snoop.pp(x4 * 2)
return result4
- `prefix`: Pass a string to start all snoop lines with that string so you can grep for them easily.
- `columns`: This specifies the columns at the start of each output line. You can pass a string with the names of built in columns separated by spaces or commas. These are the available columns:
- `time`: The current time. This is the only column by default.
- `thread`: The name of the current thread.
- `thread_ident`: The [identifier](https://docs.python.org/3/library/threading.html#threading.Thread.ident) of the current thread, in case thread names are not unique.
- `file`: The filename (not the full path) of the current function.
- `full_file`: The full path to the file (also shown anyway when the function is called).
- `function`: The name of the current function.
- `function_qualname`: The qualified name of the current function.
If you want a custom column, please open an issue to tell me what you're interested in! In the meantime, you can pass a list, where the elements are either strings or callables. The callables should take one argument, which will be an `Event` object. It has attributes `frame`, `event`, and `arg`, as specified in [`sys.settrace()`](https://docs.python.org/3/library/sys.html#sys.settrace), and other attributes which may change.
"""
if builtins:
setattr(builtins_module, snoop, package.snoop)
setattr(builtins_module, pp, package.pp)
setattr(builtins_module, spy, package.spy)
config = Config(
out=out,
prefix=prefix,
columns=columns,
overwrite=overwrite,
color=color,
enabled=enabled,
watch_extras=watch_extras,
replace_watch_extras=replace_watch_extras,
formatter_class=formatter_class,
)
package.snoop.config = config
package.pp.config = config
package.spy.config = config
setattr(builtins_module, snoop, package.snoop)
setattr(builtins_module, pp, package.pp)
setattr(builtins_module, spy, package.spy)
config = Config(
out=out,
prefix=prefix,
columns=columns,
overwrite=overwrite,
color=color,
enabled=enabled,
watch_extras=watch_extras,
replace_watch_extras=replace_watch_extras,
formatter_class=formatter_class,
)
package.snoop.config = config
package.pp.config = config
package.spy.config = config