HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/pandas/io/formats/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/pandas/io/formats/__pycache__/console.cpython-36.pyc
3

���h�	�@s,dZddlmZdd�Zdd�Zdd�Zd	S)
z+
Internal module for console introspection
�)�get_terminal_sizecCsjddlm}|d�}|d�}t�rRt�rFddlm}|d�}|d�}qZt�\}}nd\}}|p`||pf|fS)zn
    Return console size as tuple = (width, height).

    Returns (None,None) in non-interactive session.
    r)�
get_optionz
display.widthzdisplay.max_rows)�get_default_valN)NN)�pandasr�in_interactive_session�in_ipython_frontendZpandas._config.configrr)rZ
display_widthZdisplay_heightr�terminal_widthZterminal_height�r	�;/tmp/pip-build-5_djhm0z/pandas/pandas/io/formats/console.py�get_console_sizes
rcs>ddlm��fdd�}y
tp"|�Stk
r8|�SXdS)z�
    Check if we're running in an interactive shell.

    Returns
    -------
    bool
        True if running under python/ipython interactive shell.
    r)rcs:yddl}Wntk
r$�d�SXt|d�p8�d�S)Nrzmode.sim_interactive�__file__)�__main__�ModuleNotFoundError�hasattr)�main)rr	r
�
check_main@s

z*in_interactive_session.<locals>.check_mainN)rrZ__IPYTHON__�	NameError)rr	)rr
r5s	
rcCs4yt�}dtt|��j�kStk
r.YnXdS)z]
    Check if we're inside an an IPython zmq frontend.

    Returns
    -------
    bool
    ZzmqF)Zget_ipython�str�type�lowerr)�ipr	r	r
rMsrN)�__doc__�shutilrrrrr	r	r	r
�<module>s-