Server IP : 15.235.198.142 / Your IP : 216.73.216.225 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3.12/urllib/__pycache__/ |
Upload File : |
� �(�g9 � � � d Z ddlZg d�Z G d� dej � Z G d� de� Z G d� d e� Z G d � de� Zy)a Response classes used by urllib. The base class, addbase, defines a minimal file-like interface, including read() and readline(). The typical response object is an addinfourl instance, which defines an info() method that returns headers and a geturl() method that returns the url. � N)�addbase�addclosehook�addinfo� addinfourlc �4 � � e Zd ZdZ� fd�Zd� Zd� Zd� Z� xZS )r zOBase class for addinfo and addclosehook. Is a good idea for garbage collection.c �@ �� t t | � |dd�� || _ y )Nz<urllib response>F)�delete)�superr �__init__�fp)�selfr � __class__s ��&/usr/lib/python3.12/urllib/response.pyr zaddbase.__init__ s! �� � �g��&�r�+>�u�&�M���� c �h � d| j j �dt | � �d| j �d�S )N�<z at z whose fp = �>)r �__name__�id�file�r s r �__repr__zaddbase.__repr__ s( � �-1�^�^�-D�-D�-/��X�t�y�y�B� Br c �H � | j j rt d� �| S )NzI/O operation on closed file)r �closed� ValueErrorr s r � __enter__zaddbase.__enter__ s � ��7�7�>�>��;�<�<��r c �$ � | j � y �N)�close)r �type�value� tracebacks r �__exit__zaddbase.__exit__! s � �� � �r ) r � __module__�__qualname__�__doc__r r r r# � __classcell__�r s @r r r s �� �Y�� B�� r r c �, � � e Zd ZdZ� fd�Z� fd�Z� xZS )r z*Class to add a close hook to an open file.c �H �� t t | � |� || _ || _ y r )r r r � closehook�hookargs)r r r+ r, r s �r r zaddclosehook.__init__( s �� � �l�D�*�2�.�"��� �� r c � �� | j }| j }|rd | _ d | _ ||� t t | � � y # t t | � � w xY wr )r+ r, r r r )r r+ r, r s �r r zaddclosehook.close- sN �� � .����I��}�}�H��!%��� $�� ��8�$��,��+�-��E�,��+�-�s �-A �A)r r$ r% r&