U
    -e                     @   s.   d Z ddlZddlmZ dddZdd ZdS )	z A payload based version of page.    N)get_ipythonc                 C   sF   t d|}t }t| tr | }nd| i}td||d}|j| dS )aj  Print a string, piping through a pager.

    This version ignores the screen_lines and pager_cmd arguments and uses
    IPython's payload system instead.

    Parameters
    ----------
    strng : str or mime-dict
        Text to page, or a mime-type keyed dict of already formatted data.
    start : int
        Starting line at which to place the display.
    r   z
text/plainpage)sourcedatastartN)maxr   
isinstancedictZpayload_managerZwrite_payload)Zstrngr   Zscreen_linesZ	pager_cmdshellr   payload r   Y/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/IPython/core/payloadpage.pyr      s    

r   c                  C   s    t d ddlm}  t| _dS )zdDEPRECATED, use show_in_pager hook

    Install this version of page as IPython.core.page.page.
    zninstall_payload_page is deprecated.
    Use `ip.set_hook('show_in_pager, page.as_hook(payloadpage.page))`
    r   )r   N)warningswarnZIPython.corer   )Zcorepager   r   r   install_payload_page*   s    
r   )r   r   N)__doc__r   ZIPython.core.getipythonr   r   r   r   r   r   r   <module>   s   
