| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/IPython/core/__pycache__/ |
Upload File : |
�
�@�c� � �Z � d Z ddlZddlmZ ej d� � Z G d� de� � ZdS )z)Support for interactive macros in IPython� N)�DEFAULT_ENCODINGz#\s*coding[:=]\s*([-\w.]+)c �0 � e Zd ZdZd� Zd� Zd� Zd� Zd� ZdS )�Macroz�Simple class to store the value of macros as strings.
Macro is just a callable that executes a string of IPython
input when called.
c �j � g }d}|� � � D ]I}t � |� � }|r|� d� � }�4|� |� � �Jd� |� � }t
|t � � r|� |pt � � }|dz | _
dS )z?store the macro value, as a single string which can be executedN� �
)�
splitlines�coding_declaration�match�group�append�join�
isinstance�bytes�decoder �value)�self�code�lines�enc�line�coding_matchs �4/usr/lib/python3/dist-packages/IPython/core/macro.py�__init__zMacro.__init__ s� � ������O�O�%�%� #� #�D�-�3�3�D�9�9�L��
#�"�(�(��+�+������T�"�"�"�"��y�y������d�E�"�"� 8��;�;�s�6�&6�7�7�D��D�[��
�
�
� c � � | j S �N�r �r s r �__str__z
Macro.__str__&