o
    i                     @   s|   d Z ddlmZmZ ddlmZmZ ddlmZm	Z	 ddl
mZmZ ddlmZ G dd deeeZd	e eefgZd
S )z+Tornado handlers for the terminal emulator.    )webgen)JupyterHandler
path_regex)
url_escapeensure_async)ExtensionHandlerMixinExtensionHandlerJinjaMixin)nbclassic_pathc                   @   s$   e Zd ZdZejejdd ZdS )EditorHandlerz!Render the text editor interface.c                 c   sf    | d}t| j|V }|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))	file_pathbasename
page_title)
stripr   contents_managerfile_existsr   	HTTPErrorrsplitwriterender_templater   )selfpathexistsr    r   R/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/nbclassic/edit/handlers.pyget   s   

zEditorHandler.getN)	__name__
__module____qualname____doc__r   authenticatedr   	coroutiner   r   r   r   r   r      s
    r   z	{}/edit{}N)r"   tornador   r   jupyter_server.base.handlersr   r   jupyter_server.utilsr   r    jupyter_server.extension.handlerr   r	   	nbclassicr
   r   formatdefault_handlersr   r   r   r   <module>   s   