403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  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-312.pyc
�

}�eK��T�dZddlZddlmZddlmZGd�de�ZGd�de�Z	y)	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�*�eZdZdd�Zd�ZeZd�Zd�Zy)�NamedFileInTemporaryDirectoryc��tdi|��|_t|jj�|z}d|vrdnd}t	||||��|_y)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�pathr	s        �7/usr/lib/python3/dist-packages/IPython/utils/tempdir.py�__init__z&NamedFileInTemporaryDirectory.__init__
sK��*�1�D�1����D�L�L�%�%�&��1���$�;�4�G����t�W�x�@��	�c�l�|jj�|jj�y�N)r�closer�cleanup�rs rrz%NamedFileInTemporaryDirectory.cleanups ���	�	���������rc��|jSr)rrs r�	__enter__z'NamedFileInTemporaryDirectory.__enter__#s���y�y�rc�$�|j�yr)r)r�type�value�	tracebacks    r�__exit__z&NamedFileInTemporaryDirectory.__exit__&s�����rN)zw+b���F)�__name__�
__module__�__qualname__rr�__del__rr$r
rrrrs��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 �rrz#TemporaryWorkingDirectory.__enter__4s1����h�h�j����	�	�$�)�)���.��?�A�Arc�l��tj|j�tt|�|||�Sr)r/r0r.r1r+r$)r�excr"�tbr2s    �rr$z"TemporaryWorkingDirectory.__exit__9s*����	�	�$�+�+���.��>�s�E�2�N�Nr)r&r'r(�__doc__rr$�
__classcell__)r2s@rr+r+*s����B�
O�Orr+)
r6�osr/�pathlibr�tempfiler�objectrr+r
rr�<module>r<s0�����'��F��<O� 2�Or

Youez - 2016 - github.com/yon3zu
LinuXploit