
    Ib                     P   d Z ddl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mZ ddlmZ  G d	 d
e      Zi Zej%                  ej&                         ej)                  dd       ej)                  dd       ej%                  dddiidfddddidfdddiidfdddiidfd       ed   ed<   i Zej%                  ej,                          G d de      Zd%dZej2                  dk7  rdndZej2                  dk7  rdnd Zej2                  dk7  rd!nd"Zej2                  dk7  rd#Zyd$Zy)&z#Utilities for installing extensions    N)LogFormatter)BoolAny)
JupyterApp)jupyter_config_dirENV_CONFIG_PATHSYSTEM_CONFIG_PATH   )__version__c                       e Zd Zy)ArgumentConflictN)__name__
__module____qualname__     5/usr/lib/python3/dist-packages/notebook/extensions.pyr   r      s    r   r   yzgenerate-configBaseExtensionAppuserTz+Apply the operation only for the given userF)r   
sys_prefixzApply the operation system-wider   zVUse sys.prefix as the prefix for installing nbextensions (for environments, packaging)pythonInstall from a Python package)r   systemz
sys-prefixpyr   c                       e Zd ZdZeZeZeZ	e
Z eddd      Z eddd      Z eddd      Z eddd	      Zd
 Zd Zy)r   zBase nbextension installer appFTzWhether to do a user install)confighelpz Use the sys.prefix as the prefixr   NzDEPRECATED: Verbosity levelc                 f    ddl }|j                  dt        |       j                   dt               y)zWarn about verbosity changesr   Nz`verbose` traits of `zJ` has been deprecated, has no effects and will be removed in notebook 5.0.)warningswarntyper   DeprecationWarning)selfr    s     r   _verbose_changedz!BaseExtensionApp._verbose_changedA   s2    #DJ$7$7#8 9B C	
r   c                      y)zA default format for messagesz%(message)sr   )r$   s    r   _log_format_defaultz$BaseExtensionApp._log_format_defaultJ   s    r   )r   r   r   __doc__r   _log_formatter_cls_base_flagsflags_base_aliasesaliasesr   versionr   r   r   r   r   verboser%   r'   r   r   r   r   r   3   sb    (%EGGd)GHDeD/QRJ%+JKF $t*GHG
r   c                 x    |rdn| } | r|rt        d      | rt               }|S |rt        d   }|S t        d   }|S )a9  Get the location of config files for the current context

    Returns the string to the environment

    Parameters
    ----------

    user : bool [default: False]
        Get the user's .jupyter config directory
    sys_prefix : bool [default: False]
        Get sys.prefix, i.e. ~/.envs/my-env/etc/jupyter
    Fz2Cannot specify more than one of user or sys_prefixr   )r   r   r   r	   )r   r   nbexts      r   _get_config_dirr2   N   sW     5DD
STT"$
 L	 
" L #1%Lr   ntz[32m enabled [0mzenabled z[31mdisabled[0mdisabledz[32mOK[0mokz[31m X[0mz X)FF)r(   ostornado.logr   	traitletsr   r   jupyter_core.applicationr   jupyter_core.pathsr   r   r	   _versionr   
ValueErrorr   r*   updater+   popr,   r-   r   r2   nameGREEN_ENABLEDRED_DISABLEDGREEN_OKRED_Xr   r   r   <module>rD      s{   )
 
 $  /  "	z 	    :## $ T  !4 (   T
 : 	
 .	 	4
 e 	t
 ,# . $D)H    Z'' (z 64 /1ggo*:,.GGtO("$''T/t!ww$Dr   