a
    ÷£Beë  ã                   @   s,   d Z ddlZddlZG dd„ dejjƒZdS )z±A Tornado UI module for a terminal backed by terminado.

See the Tornado docs for information on UI modules:
http://www.tornadoweb.org/en/stable/guide/templates.html#ui-modules
é    Nc                   @   s&   e Zd Zd
dd„Zdd„ Zdd„ Zd	S )ÚTerminaléP   é   c                 C   s   dj |||d�S )Nz_<div class="terminado-container" data-ws-url="{ws_url}" data-rows="{rows}" data-cols="{cols}"/>)Úws_urlÚrowsÚcols)Úformat)Úselfr   r   r   © r
   úU/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/terminado/uimodule.pyÚrender   s    ÿüzTerminal.renderc                 C   s   ddgS )Nz/xstatic/termjs/term.jsz/static/terminado.jsr
   )r	   r
   r
   r   Újavascript_files   s    zTerminal.javascript_filesc                 C   sJ   t j t j t¡d¡}t|ƒ�}| ¡ W  d   ƒ S 1 s<0    Y  d S )Nzuimod_embed.js)ÚosÚpathÚjoinÚdirnameÚ__file__ÚopenÚread)r	   ÚfileÚfr
   r
   r   Úembedded_javascript   s    
zTerminal.embedded_javascriptN)r   r   )Ú__name__Ú
__module__Ú__qualname__r   r   r   r
   r
   r
   r   r      s   
r   )Ú__doc__Úos.pathr   Ztornado.webÚtornadoZwebZUIModuler   r
   r
   r
   r   Ú<module>   s   	