文件操作 - tempdir.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/ipython_genutils/__pycache__/tempdir.cpython-311.pyc
编辑文件内容
� ��XA � � � d Z ddlmZ ddlZddlZddlZ ddl m Z n!# e$ r ddl mZm Z G d� de� � Z Y nw xY w G d� d e� � Z G d � de � � ZdS )zTemporaryDirectory class, copied from Python 3 This is copied from the stdlib and will be standard in Python 3.2 and onwards. � )�print_functionN)�TemporaryDirectory)�mkdtemp�templatec � � e Zd ZdZdedfd�Zd� Zdd�Zd� Zd � Z e ej � � Z e ej j � � Z e ej j � � Z e ej � � Z e ej � � Zej Zej Zd � ZdS )r aF Create and return a temporary directory. This has the same behavior as mkdtemp but can be used as a context manager. For example: with TemporaryDirectory() as tmpdir: ... Upon exiting the context, the directory and everthing contained in it are removed. � Nc �@ � t |||� � | _ d| _ d S �NF)r �name�_closed)�self�suffix�prefix�dirs �:/usr/lib/python3/dist-packages/ipython_genutils/tempdir.py�__init__zTemporaryDirectory.__init__# s � �����4�4�D�I� �D�L�L�L� c � � | j S �N)r �r s r � __enter__zTemporaryDirectory.__enter__'