ó
ù2¢\c           @   sù  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 d	 e f d
 „  ƒ  YZ i  Z e j e j ƒ e j d d ƒ e j d d ƒ e j i i i e d 6d 6d f d 6i i e d 6e d 6d 6d f d 6i i e d 6d 6d f d 6i i e d 6d 6d f d 6ƒ e d e d <i  Z e j e j ƒ d e f d „  ƒ  YZ e e d „ Z e j d k ržd n d Z e j d k r¹d n d Z e j d k rÔd n d  Z e j d k rïd! n d" Z  d S(#   s#   Utilities for installing extensionsiÿÿÿÿN(   t   LogFormatter(   t   Boolt   Any(   t
   JupyterApp(   t   jupyter_config_dirt   ENV_CONFIG_PATHt   SYSTEM_CONFIG_PATHi   (   t   __version__t   ArgumentConflictc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s2   lib/python2.7/site-packages/notebook/extensions.pyR      s   t   ys   generate-configt   usert   BaseExtensionApps+   Apply the operation only for the given usert
   sys_prefixs   Apply the operation system-widet   systemsV   Use sys.prefix as the prefix for installing nbextensions (for environments, packaging)s
   sys-prefixt   pythons   Install from a Python packaget   pyc           B   s˜   e  Z d  Z e Z e Z e Z e	 Z
 e e d e d d ƒZ e e d e d d ƒZ e e d e d d ƒZ e d	 d e d d ƒZ d „  Z d „  Z RS(
   s   Base nbextension installer appt   configt   helps   Whether to do a user installs    Use the sys.prefix as the prefixs   Install from a Python packages   DEPRECATED: Verbosity levelc         C   s2   d d l  } | j d j t |  ƒ j ƒ t ƒ d S(   s   Warn about verbosity changesiÿÿÿÿNsa   `verbose` traits of `{}` has been deprecated, has no effects and will be removed in notebook 5.0.(   t   warningst   warnt   formatt   typeR	   t   DeprecationWarning(   t   selfR   (    (    s2   lib/python2.7/site-packages/notebook/extensions.pyt   _verbose_changedB   s    c         C   s   d S(   s   A default format for messagess   %(message)s(    (   R   (    (    s2   lib/python2.7/site-packages/notebook/extensions.pyt   _log_format_defaultG   s    N(   R	   R
   t   __doc__R    t   _log_formatter_clst   _base_flagst   flagst   _base_aliasest   aliasesR   t   versionR   t   Falset   TrueR   R   R   R   t   Nonet   verboseR   R   (    (    (    s2   lib/python2.7/site-packages/notebook/extensions.pyR   4   s   	c         C   s`   | r t  n |  }  |  r- | r- t d ƒ ‚ n  |  r? t ƒ  } n | rR t d } n
 t d } | S(   s9  Get the location of config files for the current context

    Returns the string to the enviornment

    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
    s2   Cannot specify more than one of user or sys_prefixi    (   R#   R   R   R   R   (   R   R   t   nbext(    (    s2   lib/python2.7/site-packages/notebook/extensions.pyt   _get_config_dirK   s    
t   nts   [32m enabled [0ms   enabled s   [31mdisabled[0mt   disableds   [32mOK[0mt   oks   [31m X[0ms    X(!   R   t   ost   tornado.logR    t	   traitletsR   R   t   jupyter_core.applicationR   t   jupyter_core.pathsR   R   R   t   _versionR   t
   ValueErrorR   R   t   updateR   t   popR%   R$   R#   R    R!   R   R(   t   namet   GREEN_ENABLEDt   RED_DISABLEDt   GREEN_OKt   RED_X(    (    (    s2   lib/python2.7/site-packages/notebook/extensions.pyt   <module>   sL   	


