o
    vh
                     @  s>   d Z ddlmZ ddlmZ dddZdd	d
ZdddZdS )z+
Internal module for console introspection
    )annotations)get_terminal_sizereturntuple[int | None, int | None]c                  C  sj   ddl m}  | d}| d}t r)t r#ddlm} |d}|d}n
t \}}nd\}}|p0||p3|fS )zn
    Return console size as tuple = (width, height).

    Returns (None,None) in non-interactive session.
    r   
get_optionzdisplay.widthzdisplay.max_rows)get_default_val)NN)pandasr   in_interactive_sessionin_ipython_frontendpandas._config.configr   r   )r   display_widthdisplay_heightr   terminal_widthterminal_height r   W/var/www/html/hyperkenya/venv/lib/python3.10/site-packages/pandas/io/formats/console.pyget_console_size	   s   
r   boolc                    s>   ddl m   fdd} ztp|  W S  ty   |   Y S w )z
    Check if we're running in an interactive shell.

    Returns
    -------
    bool
        True if running under python/ipython interactive shell.
    r   r   c                    s<   zdd l } W n ty    d Y S w t| d p dS )Nr   zmode.sim_interactive__file__)__main__ModuleNotFoundErrorhasattr)mainr   r   r   
check_mainA   s   z*in_interactive_session.<locals>.check_main)r	   r   __IPYTHON__	NameError)r   r   r   r   r
   6   s   	
r
   c                  C  s2   zt  } dtt|  v W S  ty   Y dS w )zZ
    Check if we're inside an IPython zmq frontend.

    Returns
    -------
    bool
    zmqF)get_ipythonstrtypelowerr   )ipr   r   r   r   O   s   r   N)r   r   )r   r   )__doc__
__future__r   shutilr   r   r
   r   r   r   r   r   <module>   s    

-