
    Mha                     :    d Z ddlZddlmZ  G d de          ZdS )z+Backport of Python 3.11's contextlib.chdir.    N)AbstractContextManagerc                   $    e Zd ZdZd Zd Zd ZdS )chdirzHNon thread-safe context manager to change the current working directory.c                 "    || _         g | _        dS )zInitialize the manager.N)path_old_cwd)selfr   s     a/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/nbconvert/utils/_contextlib_chdir.py__init__zchdir.__init__
   s    	    c                     | j                             t          j                               t          j        | j                   dS )zEnter the context.N)r   appendosgetcwdr   r   )r	   s    r
   	__enter__zchdir.__enter__   s6    RY[[)))
r   c                 \    t          j        | j                                                   dS )zExit the context.N)r   r   r   pop)r	   excinfos     r
   __exit__zchdir.__exit__   s&    
""$$%%%%%r   N)__name__
__module____qualname____doc__r   r   r    r   r
   r   r      sG        RR  
  
& & & & &r   r   )r   r   
contextlibr   r   r   r   r
   <module>r      s[    1 1 				 - - - - - -& & & & &" & & & & &r   