
    -e}                        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 dd	lmZ dd
lmZ dZddZdS )a   Provide a ``main`` function to run bokeh commands.

The following are equivalent:

* Running the ``bokeh`` command line script:

  .. code-block:: sh

      bokeh serve --show app.py

* Using ``python -m bokeh``:

  .. code-block:: sh

      python -m bokeh serve --show app.py

* Executing ``main`` programmatically:

  .. code-block:: python

      from bokeh.command.bootstrap import main

      main(["bokeh", "serve", "--show", "app.py"])

    )annotationsN)Sequence)__version__)settings)	nice_join   )subcommands)die)mainargvSequence[str]returnNonec                t   t          |           dk    r3t          dt          d t          j        D                       z             t          j        | d         d          }|                    ddd	t          
           |	                    d          }t          j        D ]J}|
                    |j        |j                  } ||          }|                    |j                   K|                    | dd                   }	 |                    |          }nC# t           $ r6}t"          j        r t          dt'          |          z              Y d}~nd}~ww xY w|du rt)          j        d           dS |dur1t-          |t.                    r|dk    rt)          j        |           dS dS dS dS )aW   Execute the Bokeh command.

    Args:
        argv (seq[str]) : a list of command line arguments to process

    Returns:
        None

    The first item in ``argv`` is typically "bokeh", and the second should
    be the name of one of the available subcommands:

    * :ref:`info <bokeh.command.subcommands.info>`
    * :ref:`json <bokeh.command.subcommands.json>`
    * :ref:`sampledata <bokeh.command.subcommands.sampledata>`
    * :ref:`secret <bokeh.command.subcommands.secret>`
    * :ref:`serve <bokeh.command.subcommands.serve>`
    * :ref:`static <bokeh.command.subcommands.static>`

    r   z*ERROR: Must specify subcommand, one of: %sc                    g | ]	}|j         
S  )name).0xs     7lib/python3.11/site-packages/bokeh/command/bootstrap.py
<listcomp>zmain.<locals>.<listcomp>\   s    EfEfEfQRafEfEfEf    r   z;See '<command> --help' to read about a specific subcommand.)progepilogz-vz	--versionversion)actionr   zSub-commands)help)parser)invokeNzERROR: FT)lenr
   r   r	   allargparseArgumentParseradd_argumentr   add_subparsers
add_parserr   r   set_defaultsr   
parse_args	Exceptionr   devstrsysexit
isinstanceint)	r   r   subscls	subparser
subcommandargsretes	            r   r   r   G   s   ( 4yyA~~89EfEfVaVeEfEfEf;g;gghhh$!WLN N NF k)[QQQ  n 55D 9 9OOCH38O<<	S	***
j&78888T!""X&&D$kk$ $ $ $< 	$	CFF"########	$ e||	DZS11cQhh 
hhs   D" "
E",,EE")r   r   r   r   )__doc__
__future__r   logging	getLogger__name__logr"   r,   typingr   bokehr   bokeh.settingsr   bokeh.util.stringsr    r	   utilr
   __all__r   r   r   r   <module>rD      s    : # " " " " " g!!  



             # # # # # # ( ( ( ( ( (            0 0 0 0 0 0r   