ó
‰]c           @   sF   d  d l  Z  d d l Te  j d e d d ƒd e f d „  ƒ  YZ d S(   iÿÿÿÿNi   (   t   *s—   'werkzeug.contrib.profiler' has moved to'werkzeug.middleware.profiler'. This import is deprecated as ofversion 0.15 and will be removed in version 1.0.t
   stacklevelt   MergeStreamc           B   s    e  Z d  Z d „  Z d „  Z RS(   s  An object that redirects ``write`` calls to multiple streams.
    Use this to log to both ``sys.stdout`` and a file::

        f = open('profiler.log', 'w')
        stream = MergeStream(sys.stdout, f)
        profiler = ProfilerMiddleware(app, stream)

    .. deprecated:: 0.15
        Use the ``tee`` command in your terminal instead. This class
        will be removed in 1.0.
    c         G   s8   t  j d t d d ƒ| s+ t d ƒ ‚ n  | |  _ d  S(   Ns}   'MergeStream' is deprecated as of version 0.15 and will be removed in version 1.0. Use your terminal's 'tee' command instead.R   i   s"   At least one stream must be given.(   t   warningst   warnt   DeprecationWarningt	   TypeErrort   streams(   t   selfR   (    (    s8   lib/python2.7/site-packages/werkzeug/contrib/profiler.pyt   __init__   s    c         C   s%   x |  j  D] } | j | ƒ q
 Wd  S(   N(   R   t   write(   R   t   datat   stream(    (    s8   lib/python2.7/site-packages/werkzeug/contrib/profiler.pyR
   (   s    (   t   __name__t
   __module__t   __doc__R	   R
   (    (    (    s8   lib/python2.7/site-packages/werkzeug/contrib/profiler.pyR      s   	(   R   t   middleware.profilerR   R   t   objectR   (    (    (    s8   lib/python2.7/site-packages/werkzeug/contrib/profiler.pyt   <module>   s   
