
    Mh                     >    d Z ddlmZ ddlmZ  G d de          ZdS )zHPayload system for IPython.

Authors:

* Fernando Perez
* Brian Granger
    )Configurable)Listc                   D    e Zd ZU  eg           Zeed<   ddZd Zd ZdS )PayloadManager_payloadTc                    t          |t                    st          d|z            |rCd|v r?|d         }t          | j                  D ]"\  }}d|v r|d         |k    r|| j        |<    dS #| j                            |           dS )zInclude or update the specified `data` payload in the PayloadManager.

        If a previous payload with the same source exists and `single` is True,
        it will be overwritten with the new one.
        z*Each payload write must be a dict, got: %rsourceN)
isinstancedict	TypeError	enumerater   append)selfdatasingler	   ipls         T/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/IPython/core/payload.pywrite_payloadzPayloadManager.write_payload   s     $%% 	QH4OPPP 	h$&&(^F"4=11  2r>>blf&<&<'+DM!$FFT"""""    c                     | j         S Nr   r   s    r   read_payloadzPayloadManager.read_payload2   s
    }r   c                     g | _         d S r   r   r   s    r   clear_payloadzPayloadManager.clear_payload5   s    r   N)T)	__name__
__module____qualname__r   r   __annotations__r   r   r    r   r   r   r      s`         T"XXHd# # # #&      r   r   N)__doc__traitlets.config.configurabler   	traitletsr   r   r"   r   r   <module>r&      si    & 7 6 6 6 6 6          \     r   