403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
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 :  /lib/python3/dist-packages/IPython/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/IPython/utils/__pycache__/tempdir.cpython-311.pyc
�

�@�cK��b�dZddlZddlmZddlmZGd�de��ZGd�de��Z	dS)	a This module contains classes - NamedFileInTemporaryDirectory, TemporaryWorkingDirectory.

These classes add extra features such as creating a named file in temporary directory and
creating a context manager for the working directory which is also temporary.
�N)�Path)�TemporaryDirectoryc�,�eZdZd	d�Zd�ZeZd�Zd�ZdS)
�NamedFileInTemporaryDirectory�w+b���Fc��tdi|��|_t|jj��|z}d|vrdnd}t	||||���|_dS)aN
        Open a file named `filename` in a temporary directory.

        This context manager is preferred over `NamedTemporaryFile` in
        stdlib `tempfile` when one needs to reopen the file.

        Arguments `mode` and `bufsize` are passed to `open`.
        Rest of the arguments are passed to `TemporaryDirectory`.

        �bNzutf-8)�encoding�)r�_tmpdirr�name�open�file)�self�filename�mode�bufsize�add_to_syspath�kwds�pathrs        �7/usr/lib/python3/dist-packages/IPython/utils/tempdir.py�__init__z&NamedFileInTemporaryDirectory.__init__
s]��*�1�1�D�1�1����D�L�%�&�&��1���$�;�;�4�4�G����t�W�x�@�@�@��	�	�	�c�j�|j���|j���dS�N)r�closer
�cleanup�rs rrz%NamedFileInTemporaryDirectory.cleanups.���	��������������rc��|jSr)rrs r�	__enter__z'NamedFileInTemporaryDirectory.__enter__#s
���y�rc�.�|���dSr)r)r�type�value�	tracebacks    r�__exit__z&NamedFileInTemporaryDirectory.__exit__&s���������rN)rrF)�__name__�
__module__�__qualname__rr�__del__r!r&rrrrrs`������A�A�A�A� ����G��������rrc�,��eZdZdZ�fd�Z�fd�Z�xZS)�TemporaryWorkingDirectoryz�
    Creates a temporary directory and sets the cwd to that directory.
    Automatically reverts to previous cwd upon cleanup.
    Usage example:

        with TemporaryWorkingDirectory() as tmpdir:
            ...
    c���tj��|_tj|j��t
t|�����Sr)	r�cwd�old_wd�_os�chdirr�superr,r!)r�	__class__s �rr!z#TemporaryWorkingDirectory.__enter__4s?����h�j�j����	�$�)�����.��5�5�?�?�A�A�Arc���tj|j��tt|���|||��Sr)r0r1r/r2r,r&)r�excr$�tbr3s    �rr&z"TemporaryWorkingDirectory.__exit__9s8����	�$�+�����.��5�5�>�>�s�E�2�N�N�Nr)r'r(r)�__doc__r!r&�
__classcell__)r3s@rr,r,*si���������B�B�B�B�B�
O�O�O�O�O�O�O�O�Orr,)
r7�osr0�pathlibr�tempfiler�objectrr,rrr�<module>r=s���������������'�'�'�'�'�'������F����<O�O�O�O�O� 2�O�O�O�O�Or

Youez - 2016 - github.com/yon3zu
LinuXploit