# Path: snoop/configuration.py
# class Config(object):
#     """"
#     If you need more control than the global `install` function, e.g. if you want to write to several different files in one process, you can create a `Config` object, e.g: `config = snoop.Config(out=filename)`. Then `config.snoop`, `config.pp` and `config.spy` will use that configuration rather than the global one.
#     
#     The arguments are the same as the arguments of `install()` relating to output configuration and `enabled`.
#     """
#     
#     def __init__(
#             self,
#             out=None,
#             prefix='',
#             columns='time',
#             overwrite=False,
#             color=None,
#             enabled=True,
#             watch_extras=(),
#             replace_watch_extras=None,
#             formatter_class=DefaultFormatter,
#             pformat=None,
#     ):
#         if can_color:
#             if color is None:
#                 isatty = getattr(out or sys.stderr, 'isatty', lambda: False)
#                 color = bool(isatty())
#         else:
#             color = False
# 
#         self.write = get_write_function(out, overwrite)
#         self.formatter = formatter_class(prefix, columns, color)
#         self.enabled = enabled
# 
#         if pformat is None:
#             try:
#                 from prettyprinter import pformat
#             except Exception:
#                 try:
#                     from pprintpp import pformat
#                 except Exception:
#                     from pprint import pformat
# 
#         self.pformat = pformat
# 
#         self.pp = PP(self)
# 
#         class ConfiguredTracer(Tracer):
#             config = self
# 
#         self.snoop = ConfiguredTracer
#         self.spy = Spy(self)
# 
#         self.last_frame = None
#         self.thread_local = threading.local()
# 
#         if replace_watch_extras is not None:
#             self.watch_extras = ensure_tuple(replace_watch_extras)
#         else:
#             self.watch_extras = (len_shape_watch, dtype_watch) + ensure_tuple(watch_extras)


from snoop.configuration import Config


def watch_type(source, value):
    return 'type({})'.format(source), type(value).__name__


def foo():
    x = 1
    y = [x]
    return y


def main():

# Path: snoop/configuration.py
# class Config(object):
#     """"
#     If you need more control than the global `install` function, e.g. if you want to write to several different files in one process, you can create a `Config` object, e.g: `config = snoop.Config(out=filename)`. Then `config.snoop`, `config.pp` and `config.spy` will use that configuration rather than the global one.
#     
#     The arguments are the same as the arguments of `install()` relating to output configuration and `enabled`.
#     """
#     
#     def __init__(
#             self,
#             out=None,
#             prefix='',
#             columns='time',
#             overwrite=False,
#             color=None,
#             enabled=True,
#             watch_extras=(),
#             replace_watch_extras=None,
#             formatter_class=DefaultFormatter,
#             pformat=None,
#     ):
#         if can_color:
#             if color is None:
#                 isatty = getattr(out or sys.stderr, 'isatty', lambda: False)
#                 color = bool(isatty())
#         else:
#             color = False
# 
#         self.write = get_write_function(out, overwrite)
#         self.formatter = formatter_class(prefix, columns, color)
#         self.enabled = enabled
# 
#         if pformat is None:
#             try:
#                 from prettyprinter import pformat
#             except Exception:
#                 try:
#                     from pprintpp import pformat
#                 except Exception:
#                     from pprint import pformat
# 
#         self.pformat = pformat
# 
#         self.pp = PP(self)
# 
#         class ConfiguredTracer(Tracer):
#             config = self
# 
#         self.snoop = ConfiguredTracer
#         self.spy = Spy(self)
# 
#         self.last_frame = None
#         self.thread_local = threading.local()
# 
#         if replace_watch_extras is not None:
#             self.watch_extras = ensure_tuple(replace_watch_extras)
#         else:
#             self.watch_extras = (len_shape_watch, dtype_watch) + ensure_tuple(watch_extras)


# Path: tests/samples/watch_extras.py
from snoop.configuration import Config



def watch_type(source, value):
    return 'type({})'.format(source), type(value).__name__


def foo():
    x = 1
    y = [x]
    return y


def main():

    Config(watch_extras=watch_type).snoop(foo)()