a
    b(                     @   sb   d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	m
Z
 G dd de
e	eZde efgZd	S )
z+Tornado handlers for the terminal emulator.    )web)JupyterHandler
path_regex)
url_escape)ExtensionHandlerMixinExtensionHandlerJinjaMixinc                   @   s   e Zd ZdZejdd ZdS )EditorHandlerz!Render the text editor interface.c                 C   sZ   | d}| j|s&tdd| |ddd }| | jdt|||d d d S )	N/i  zFile does not exist: %s   z	edit.htmlz
 (editing))Z	file_pathbasenameZ
page_title)	stripZcontents_managerZfile_existsr   Z	HTTPErrorrsplitwriteZrender_templater   )selfpathr    r   6lib/python3.9/site-packages/nbclassic/edit/handlers.pyget   s    

zEditorHandler.getN)__name__
__module____qualname____doc__r   Zauthenticatedr   r   r   r   r   r      s   r   z/edit%sN)r   Ztornador   Zjupyter_server.base.handlersr   r   Zjupyter_server.utilsr   Z jupyter_server.extension.handlerr   r   r   Zdefault_handlersr   r   r   r   <module>   s   
