B
    @\@                 @   s   d Z ddlmZmZmZmZ ddlZeeZ	ddl
Z
ddlmZ ddlmZ ddlmZmZ ddlmZ dd	lmZ d
Zdd ZG dd deZdS )ae  

To display information about Bokeh and Bokeh server configuration,
type ``bokeh info`` on the command line.

.. code-block:: sh

    bokeh info

This will print general information to standard output, such as Python and Bokeh versions:

.. code-block:: none

    Python version      :  3.6.5
    IPython version     :  6.3.1
    Bokeh version       :  0.12.15
    BokehJS static path :  /opt/anaconda/lib/python3.6/site-packages/bokeh/server/static
    node.js version     :  v8.11.1
    npm version         :  5.8.0

Sometimes it can be useful to get just paths to the BokehJS static files in order
to configure other servers or processes. To do this, use the ``--static`` option

.. code-block:: sh

    bokeh info --static

This will produce output like what is shown below

.. code-block:: none

    /opt/anaconda/lib/python3.6/site-packages/bokeh/server/static

    )absolute_importdivisionprint_functionunicode_literalsN)__version__)settings)nodejs_versionnpmjs_version)import_optional   )
Subcommand)Infoc             C   s   t | }|rt||S d S )N)r
   getattr)modnameattrmod r   =lib/python3.7/site-packages/bokeh/command/subcommands/info.py_versionO   s    r   c               @   s2   e Zd ZdZdZdZdedddffZdd	 Zd
S )r   zR Subcommand to print information about Bokeh and Bokeh server configuration.

    infoz<print information about Bokeh and Bokeh server configurationz--static
store_truez+Print the locations of BokehJS static files)actionhelpc             C   s   |j rtt  ndd }tdtjdd   td|tdd  td	|td
d  tdt  tdt   td|t	   td|t
   dS )z


        c             S   s   | pdS )Nz(not installed)r   )Zversion_or_noner   r   r   <lambda>r   s    zInfo.invoke.<locals>.<lambda>zPython version      :  %s
r   zIPython version     :  %sZIPythonr   zTornado version     :  %sZtornadoversionzBokeh version       :  %szBokehJS static path :  %sznode.js version     :  %sznpm version         :  %sN)Zstaticprintr   Z
bokehjsdirsysr   splitr   r   r   r	   )selfargsZif_installedr   r   r   invokek   s    zInfo.invokeN)	__name__
__module____qualname____doc__namer   dictr    r!   r   r   r   r   r   X   s   r   )r%   Z
__future__r   r   r   r   ZloggingZ	getLoggerr"   logr   Zbokehr   Zbokeh.settingsr   Zbokeh.util.compilerr   r	   Zbokeh.util.dependenciesr
   Z
subcommandr   __all__r   r   r   r   r   r   <module>(   s   
	