| Server IP : 217.160.0.135 / Your IP : 216.73.216.115 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/lib/__pycache__/ |
Upload File : |
�
�@�c� � �r � d Z ddlZddlZddlmZ ddlmc mZ G d� de� � Z d� Z
defd�Zd � Z
d
� ZdS )z3 Utilities for accessing the platform's clipboard.
� N)�TryNextc � � e Zd ZdS )�ClipboardEmptyN)�__name__�
__module__�__qualname__� � �7/usr/lib/python3/dist-packages/IPython/lib/clipboard.pyr r
s � � � � � ��Dr
r c � � ddl } n"# t $ r}t d� � |�d}~ww xY w| � � � | � | j � � }ns# t | j f$ r_ | � | j � � }t j
|t j � � }n!# t | j f$ r
}t |�d}~ww xY wY nw xY w| �
� � n# | �
� � w xY w|S )zc Get the current clipboard's text on Windows.
Requires Mark Hammond's pywin32 extensions.
r NziGetting text from the clipboard requires the pywin32 extensions: http://sourceforge.net/projects/pywin32/)�win32clipboard�ImportErrorr �
OpenClipboard�GetClipboardData�CF_UNICODETEXT� TypeError�error�CF_TEXT� py3compat�cast_unicode�DEFAULT_ENCODINGr �CloseClipboard)r
�e�texts r �win32_clipboard_getr sH � �
U�������� U� U� U�� M� N� N�ST� U�����U���� � � �"�"�"� (��.�.�~�/L�M�M�����~�+�,� (� (� (� (�!�2�2�>�3I�J�J�D��)�$� �0J�K�K�D�D���>�/�0� (� (� (� �a�'����� (����
�D�(���� �%�%�'�'�'�'���%�%�'�'�'�'�����Ks] � �
&�!�&�A �C! �C �+9B%�$C �%C�6B>�>C�C �C! �C � C! �!C7�returnc �� � t j g d�t j �� � } | � � � \ }}|� dd� � }t j |� � }|S )z' Get the clipboard's text on OS X.
)�pbpastez-Prefer�ascii��stdout�
�
)�
subprocess�Popen�PIPE�communicate�replacer �decode)�p�bytes_�stderrr s r �osx_clipboard_getr- &