o
    ;i]                     @   sN   d Z ddlZddlmZ ddlmZ ddgZejdeeddf fd	dZdS )
a  Interface to Modal's OutputManager functionality.

These functions live here so that Modal library code can import them without
transitively importing Rich, as we do in _output/rich.py. This allows
us to avoid importing Rich for client code that runs in the container environment.
    N)	Generator   )OutputManagerenable_outputr   returnc               	   c   sJ    t  } ddlm} | }t | z|V  W t |  dS t |  w )a  Context manager that enable output when using the Python SDK.

    This will print to stdout and stderr things such as
    1. Logs from running functions
    2. Status of creating objects
    3. Map progress

    Example:
    ```python
    app = modal.App()
    with modal.enable_output():
        with app.run():
            ...
    ```

    To suppress progress indicators, use `output_manager.set_quiet_mode(True)`.
    To enable timestamps, use `output_manager.set_timestamps(True)`.
    r   )RichOutputManagerN)r   get_output.richr   _set)previous_output_managerr   new_manager r   @/home/ubuntu/.local/lib/python3.10/site-packages/modal/output.pyr      s   
)	__doc__
contextlibcollections.abcr   _output.managerr   __all__contextmanagerr   r   r   r   r   <module>   s   