← Back
Editing: displayhook.cpython-311.pyc
� �@�c@1 � � � d Z ddlZddlZddlZddlZddlmZ ddl m Z mZ ddlm Z G d� de� � Z G d� d e� � ZdS ) zaDisplayhook for IPython. This defines a callable class that IPython uses for `sys.displayhook`. � N)�Configurable)�Instance�Float)�warnc �� � � e Zd ZdZ edd�� � Z edd�� � Z ed� � Zd� fd � Z e d � � � Zd� Zd� Z d � Zd� Zd� ZdZddd�Zd� Zd� Zd� Zd� Zdd�Zd� Zd� Z� xZS )�DisplayHookz�The custom IPython displayhook to replace sys.displayhook. This class does many things, but the basic idea is that it is a callable that gets called anytime user code returns a value. z1IPython.core.interactiveshell.InteractiveShellABCT)� allow_nonez-IPython.core.interactiveshell.ExecutionResultg�������?N�� c �t �� t t | � � j d d|i|�� d}|dk r d| _ d}n+||k rd| _ d}t d|z d�� � nd| _ || _ || _ d\ | _ | _ | _ | j | j | j d�}| j j � |� � d S ) N�shell� r z6caching was disabled (min value for cache size is %s).)� stacklevel� �� r r ��_�__�___� )�superr �__init__� do_full_cacher � cache_sizer r r r �user_ns�update)�selfr r �kwargs�cache_size_min� to_user_ns� __class__s ��:/usr/lib/python3/dist-packages/IPython/core/displayhook.pyr zDisplayHook.__init__$ s� �� �)��k�4� � �)�@�@��@��@�@�@�����?�?�!"�D���J�J� �.� (� (�!"�D���J��I�� �+,� .� .� .� .� .� "#�D��$��� �� �"*����t�w�t�x� �&�d�g�D�H�=�=� �� ��!�!�*�-�-�-�-�-� c � � | j j S �N)r �execution_count�r s r"