o
    éÇh¼
  ã                   @  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   úm/var/www/html/construction_image-detection-poc/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    

-