Your IP : 3.145.83.96


Current Path : /opt/alt/python34/lib64/python3.4/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/urllib/__pycache__/response.cpython-34.pyo

�
e f��@s�dZddlZddddgZGdd�dej�ZGdd�de�ZGd	d�de�ZGd
d�de�ZdS)aResponse 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�
addinfourlcsLeZdZdZ�fdd�Zdd�Zdd�Zdd	�Z�S)
rzOBase class for addinfo and addclosehook. Is a good idea for garbage collection.cs,tt|�j|ddd�||_dS)Nz<urllib response>ZdeleteF)�superr�__init__�fp)�selfr)�	__class__��4/opt/alt/python34/lib64/python3.4/urllib/response.pyrszaddbase.__init__cCs d|jjt|�|jfS)Nz<%s at %r whose fp = %r>)r
�__name__�id�file)r	rrr�__repr__szaddbase.__repr__cCs|jjrtd��n|S)NzI/O operation on closed file)r�closed�
ValueError)r	rrr�	__enter__szaddbase.__enter__cCs|j�dS)N)�close)r	�type�value�	tracebackrrr�__exit__!szaddbase.__exit__)r
�
__module__�__qualname__�__doc__rrrrrr)r
rrs
cs:eZdZdZ�fdd�Z�fdd�Z�S)rz*Class to add a close hook to an open file.cs,tt|�j|�||_||_dS)N)rrr�	closehook�hookargs)r	rrr)r
rrr(s	zaddclosehook.__init__csVz;|j}|j}|r:d|_d|_||�nWdtt|�j�XdS)N)rrrrr)r	rr)r
rrr-s				zaddclosehook.close)r
rrrrrrr)r
rr%scs4eZdZdZ�fdd�Zdd�Z�S)rz.class to add an info() method to an open file.cs#tt|�j|�||_dS)N)rrr�headers)r	rr)r
rrr<szaddinfo.__init__cCs|jS)N)r)r	rrr�info@szaddinfo.info)r
rrrrrrr)r
rr9scsCeZdZdZd�fdd�Zdd�Zdd�Z�S)	rz9class to add info() and geturl() methods to an open file.Ncs/tt|�j||�||_||_dS)N)rrr�url�code)r	rrr r!)r
rrrGs	zaddinfourl.__init__cCs|jS)N)r!)r	rrr�getcodeLszaddinfourl.getcodecCs|jS)N)r )r	rrr�geturlOszaddinfourl.geturl)r
rrrrr"r#rr)r
rrDs)rZtempfile�__all__Z_TemporaryFileWrapperrrrrrrrr�<module>s

?>