Format: application/x-python-code
1 o
2
3 ��h�2 � @ sp d Z ddlZddlZddlZddlZddlmZ ddl m
4 Z
5 mZ ddlm
6 Z
7 G dd� de�ZG dd � d e�ZdS )
8 zaDisplayhook for IPython.
9
10 This defines a callable class that IPython uses for `sys.displayhook`.
11 � N)�Configurable)�Instance�Float)�warnc s� e Zd ZdZeddd�Zeddd�Zed�Zd+� fd d
12 � Z e
13 dd� �Zd
14 d� Zdd� Z
15 edd� �Zdd� Zdd� Zdd� ZdZd,d-dd�Zdd� Zdd � Zd!d"� Zd#d$� Zd,d%d&�Zd'd(� Zd)d*� Z� ZS ).�DisplayHookz�The custom IPython displayhook to replace sys.displayhook.
16
17 This class does many things, but the basic idea is that it is a callable
18 that gets called anytime user code returns a value.
19 z1IPython.core.interactiveshell.InteractiveShellABCT)�
20 allow_nonez-IPython.core.interactiveshell.ExecutionResultg�������?N�� c s� t t| �jd d|i|�� d}|dkrd| _d}n||k r+d| _d}td| dd� nd| _|| _|| _d\| _| _| _ | j| j| j d�}| jj
21 �|� d S )
22 N�shell� r z6caching was disabled (min value for cache size is %s).)�
23 stacklevel� �� r r ��_�__�___� )�superr �__init__�
24 do_full_cacher �
25 cache_sizer r r r �user_ns�update)�selfr r �kwargsZcache_size_minZ
26 to_user_ns�� __class__r �Nc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/core/displayhook.pyr $ s&