????
| Current Path : /usr/lib/python2.7/site-packages/pip/_internal/utils/ |
| Current File : //usr/lib/python2.7/site-packages/pip/_internal/utils/temp_dir.pyc |
�
}�\]c @@ s� d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z e j
e � Z d e
f d � � YZ d e f d � � YZ d S( i ( t absolute_importN( t rmtreet
TempDirectoryc B@ sM e Z d Z d d d d � Z d � Z d � Z d � Z d � Z d � Z RS( s' Helper class that owns and cleans up a temporary directory.
This class can be used as a context manager or as an OO representation of a
temporary directory.
Attributes:
path
Location to the created temporary directory or None
delete
Whether the directory should be deleted when exiting
(when used as a contextmanager)
Methods:
create()
Creates a temporary directory and stores its path in the path
attribute.
cleanup()
Deletes the temporary directory and sets path attribute to None
When used as a context manager, a temporary directory is created on
entering the context and, if the delete attribute is True, on exiting the
context the created directory is deleted.
t tempc C@ sS t t | � j � | d k r4 | d k r4 t } n | | _ | | _ | | _ d S( N( t superR t __init__t Nonet Truet patht deletet kind( t selfR R R
( ( s; /tmp/pip-install-ewDPok/pip/pip/_internal/utils/temp_dir.pyR '