
    hje                        d Z ddlmZ ddlZ ej        e          ZddlZddlZddl	m
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mZ dZddZddZ G d de          ZdS )ai  

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.11.3 | packaged by conda-forge | (main, Apr  6 2023, 08:57:19) [GCC 11.3.0]
    IPython version       :  8.13.2
    Tornado version       :  6.3
    Bokeh version         :  3.3.0
    BokehJS static path   :  /opt/anaconda/envs/test/lib/python3.11/site-packages/bokeh/server/static
    node.js version       :  v18.16.1
    npm version           :  9.5.1
    jupyter_bokeh version :  (not installed)
    Operating system      :  Linux-5.15.0-86-generic-x86_64-with-glibc2.35

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/envs/test/lib/python3.11/site-packages/bokeh/server/static

    )annotationsN)	Namespace)__version__)settings)nodejs_versionnpmjs_version)import_optional   )Argument
Subcommand)Infoversion_or_none
str | Nonereturnstrc                
    | pdS )zy helper method to optionally return module version number or not installed

    :param version_or_none:
    :return:
    z(not installed) )r   s    >lib/python3.11/site-packages/bokeh/command/subcommands/info.pyif_installedr   S   s     ///    module_nameattrc                H    t          |           }|rt          ||          nd S )N)r	   getattr)r   r   modules      r   _versionr   [   s)    [))F$*4764   4r   c                  B    e Zd ZdZdZdZd e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helpargsr   r   Nonec           	     :   |j         r"t          t          j                               dS d}t          dt          j                            |          d                     t          dt          t          dd                                t          dt          t          dd	                                t          d
t                      t          dt          j                                t          dt          t                                            t          dt          t                                            t          dt          t          dd                                t          dt          j                                dS )z


        
zPython version        :  r   zIPython version       :  IPythonr   zTornado version       :  tornadoversionzBokeh version         :  zBokehJS static path   :  znode.js version       :  znpm version           :  zjupyter_bokeh version :  jupyter_bokehzOperating system      :  N)staticprintr   
bokehjsdirsysr(   splitr   r   r   r   r   platform)selfr"   newlines      r   invokezInfo.invokev   s~    ; 	E(%''(((((GMck.?.?.H.H.KMMNNN`l8I};];].^.^``aaa\l8Iy;Y;Y.Z.Z\\]]];k;;<<<Eh.A.C.CEEFFFNl>;K;K.L.LNNOOOMl=??.K.KMMNNNfl8OUb;c;c.d.dffgggCh.?.A.ACCDDDDDr   N)r"   r   r   r#   )	__name__
__module____qualname____doc__namer!   r   r"   r2   r   r   r   r   r   c   sn         
 DID 
XX>
 
 
 	DE E E E E Er   r   )r   r   r   r   )r   r   r   r   r   r   )r6   
__future__r   logging	getLoggerr3   logr/   r-   argparser   bokehr   bokeh.settingsr   bokeh.util.compilerr   r   bokeh.util.dependenciesr	   
subcommandr   r   __all__r   r   r   r   r   r   <module>rC      s<  $ $R # " " " " " g!!  



             # # # # # # = = = = = = = = 3 3 3 3 3 3 . - - - - - - -0 0 0 05 5 5 5#E #E #E #E #E: #E #E #E #E #Er   