HEX
Server: Apache
System: Linux aura.ambarhosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User: chicagos (1295)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/awscli/help.pyc
�
R$�_c@s*ddlZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZej d�Z!de"fd��YZ#d�Z$de%fd��YZ&de&fd��YZ'de&fd��YZ(de%fd��YZ)de)fd��YZ*de)fd ��YZ+d!e)fd"��YZ,d#e)fd$��YZ-d%e)fd&��YZ.dS('i����N(tPopentPIPE(tpublish_string(tmanpage(tProviderDocumentEventHandler(tServiceDocumentEventHandler(tOperationDocumentEventHandler(tTopicListerDocumentEventHandler(tTopicDocumentEventHandler(t	docevents(tReSTDocument(t
TextWriter(tParamShorthandParser(tArgTableArgParser(t
TopicTagDB(t
ignore_ctrl_csawscli.helptExecutableNotFoundErrorcBseZd�ZRS(cCstt|�jd|�dS(Ns$Could not find executable named "%s"(tsuperRt__init__(tselftexecutable_name((s//usr/lib/python2.7/site-packages/awscli/help.pyR)s(t__name__t
__module__R(((s//usr/lib/python2.7/site-packages/awscli/help.pyR(scCs$tj�dkrt�St�SdS(sZ
    Return the appropriate HelpRenderer implementation for the
    current platform.
    tWindowsN(tplatformtsystemtWindowsHelpRenderertPosixHelpRenderer(((s//usr/lib/python2.7/site-packages/awscli/help.pytget_renderer.stPagingHelpRenderercBsPeZdZejd�ZdZd�Zd�Z	d�Z
d�Zd�ZRS(s�
    Interface for a help renderer.

    The renderer is responsible for displaying the help content on
    a particular platform.

    cCs
||_dS(N(t
output_stream(RR((s//usr/lib/python2.7/site-packages/awscli/help.pyRAscCsT|j}dtjkr(tjd}ndtjkrGtjd}ntj|�S(NtMANPAGERtPAGER(R tostenvirontshlextsplit(Rtpager((s//usr/lib/python2.7/site-packages/awscli/help.pytget_pager_cmdlineFs	cCs |j|�}|j|�dS(s`
        Each implementation of HelpRenderer must implement this
        render method.
        N(t_convert_doc_contentt_send_output_to_pager(Rtcontentstconverted_content((s//usr/lib/python2.7/site-packages/awscli/help.pytrenderNscCsE|j�}tjd|�|j|dt�}|jd|�dS(NsRunning command: %ststdintinput(R&tLOGtdebugt_popenRtcommunicate(Rtoutputtcmdlinetp((s//usr/lib/python2.7/site-packages/awscli/help.pyR(VscOs
t||�S(N(R(Rtargstkwargs((s//usr/lib/python2.7/site-packages/awscli/help.pyR0\scCs|S(N((RR)((s//usr/lib/python2.7/site-packages/awscli/help.pyR'_sN(
RRt__doc__tsyststdoutRtNoneR R&R+R(R0R'(((s//usr/lib/python2.7/site-packages/awscli/help.pyR9s				RcBs/eZdZdZd�Zd�Zd�ZRS(s[
    Render help content on a Posix-like system.  This includes
    Linux and MacOS X.
    sless -RcCs�t|dtj��}|jd�s6td��ndddddg}tjd|�|j|dtd	td
t�}|j	d|�d}|S(
Ntwritertgroffs-mtmans-TtasciisRunning command: %sR,R9tstderrR-i(
RRtWritert_exists_on_pathRR.R/R0RR1(RR)tman_contentsR3tp3tgroff_output((s//usr/lib/python2.7/site-packages/awscli/help.pyR'ks!cCs�|j�}|j|d�sbtjd|d�|jj|jd�d�|jj�dStjd|�t��*|j	|dt
�}|jd|�WdQXdS(Nis0Pager '%s' not found in PATH, printing raw help.sutf-8s
sRunning command: %sR,R-(R&RAR.R/RtwritetdecodetflushRR0RR1(RR2R3R4((s//usr/lib/python2.7/site-packages/awscli/help.pyR(us	

cCsStgtjjdd�jtj�D]'}tjjtjj||��^q%�S(NtPATHt(	tanyR!R"tgetR$tpathseptpathtexiststjoin(RtnameR4((s//usr/lib/python2.7/site-packages/awscli/help.pyRA�s(RRR7R R'R(RA(((s//usr/lib/python2.7/site-packages/awscli/help.pyRcs
	
	RcBs&eZdZdZd�Zd�ZRS(s*Render help content on a Windows platform.tmorecCst|dt��}|S(NR;(RR(RR)ttext_output((s//usr/lib/python2.7/site-packages/awscli/help.pyR'�s	cOst|d<t||�S(Ntshell(tTrueR(RR5R6((s//usr/lib/python2.7/site-packages/awscli/help.pyR0�s
(RRR7R R'R0(((s//usr/lib/python2.7/site-packages/awscli/help.pyR�s	tHelpCommandcBsbeZdZdZd�Zed��Zed��Zed��Z	ed��Z
d�ZRS(sk
    HelpCommand Interface
    ---------------------
    A HelpCommand object acts as the interface between objects in the
    CLI (e.g. Providers, Services, Operations, etc.) and the documentation
    system (bcdoc).

    A HelpCommand object wraps the object from the CLI space and provides
    a consistent interface to critical information needed by the
    documentation pipeline such as the object's name, description, etc.

    The HelpCommand object is passed to the component of the
    documentation pipeline that fires documentation events.  It is
    then passed on to each document event handler that has registered
    for the events.

    All HelpCommand objects contain the following attributes:

        + ``session`` - A ``botocore`` ``Session`` object.
        + ``obj`` - The object that is being documented.
        + ``command_table`` - A dict mapping command names to
              callable objects.
        + ``arg_table`` - A dict mapping argument names to callable objects.
        + ``doc`` - A ``Document`` object that is used to collect the
              generated documentation.

    In addition, please note the `properties` defined below which are
    required to allow the object to be used in the document pipeline.

    Implementations of HelpCommand are provided here for Provider,
    Service and Operation objects.  Other implementations for other
    types of objects might be needed for customization in plugins.
    As long as the implementations conform to this basic interface
    it should be possible to pass them to the documentation system
    and generate interactive and static help files.
    cCs�||_||_|dkr'i}n||_|dkrEi}n||_i|_g|_t�|_t	dd�|_
dS(NttargetR=(tsessiontobjR:t
command_tablet	arg_tablet_subcommand_tablet_related_itemsRtrendererR
tdoc(RRWRXRYRZ((s//usr/lib/python2.7/site-packages/awscli/help.pyR�s								cCsdS(sX
        Return the ``event_class`` for this object.

        The ``event_class`` is used by the documentation pipeline
        when generating documentation events.  For the event below::

            doc-title.<event_class>.<name>

        The document pipeline would use this property to determine
        the ``event_class`` value.
        N((R((s//usr/lib/python2.7/site-packages/awscli/help.pytevent_class�s
cCsdS(s�
        Return the name of the wrapped object.

        This would be called by the document pipeline to determine
        the ``name`` to be inserted into the event, as shown above.
        N((R((s//usr/lib/python2.7/site-packages/awscli/help.pyRP�scCs|jS(s=These are the commands that may follow after the help command(R[(R((s//usr/lib/python2.7/site-packages/awscli/help.pytsubcommand_table�scCs|jS(s:This is list of items that are related to the help command(R\(R((s//usr/lib/python2.7/site-packages/awscli/help.pyt
related_items�scCs�|r_ti|j�}|j|�\}}t|dd�dk	r_|j|j||�Sn|j|�}tj|j	|�|j
j|jj
��|j�dS(Nt
subcommand(R
R`tparse_known_argstgetattrR:RbtEventHandlerClassR	tgenerate_eventsRWR]R+R^tgetvaluet
unregister(RR5tparsed_globalstsubcommand_parsertparsedt	remainingtinstance((s//usr/lib/python2.7/site-packages/awscli/help.pyt__call__s
N(RRR7R:ReRtpropertyR_RPR`RaRn(((s//usr/lib/python2.7/site-packages/awscli/help.pyRU�s$	
tProviderHelpCommandcBsSeZdZeZd�Zed��Zed��Zed��Z	d�Z
RS(s^Implements top level help command.

    This is what is called when ``aws help`` is run.

    cCsVtj||d||�||_||_||_d|_d|_dg|_dS(Nsaws help topics(	RURR:tdescriptiontsynopsist
help_usageR[t
_topic_tag_dbR\(RRWRYRZRqRrtusage((s//usr/lib/python2.7/site-packages/awscli/help.pyRs
					cCsdS(Ntaws((R((s//usr/lib/python2.7/site-packages/awscli/help.pyR_'scCsdS(NRv((R((s//usr/lib/python2.7/site-packages/awscli/help.pyRP+scCsS|jdkrL|jdkr-t�|_n|jj�|j�|_n|jS(N(R[R:RtRtload_json_indext_create_subcommand_table(R((s//usr/lib/python2.7/site-packages/awscli/help.pyR`/s
cCs_i}t|j�}||d<|jj�}x*|D]"}t|j|�}|||<q5W|S(Nttopics(tTopicListerCommandRWRttget_all_topic_namestTopicHelpCommand(RR`ttopic_lister_commandttopic_namest
topic_namettopic_help_command((s//usr/lib/python2.7/site-packages/awscli/help.pyRx8s

(RRR7RReRRoR_RPR`Rx(((s//usr/lib/python2.7/site-packages/awscli/help.pyRps		tServiceHelpCommandcBs;eZdZeZd�Zed��Zed��ZRS(s�Implements service level help.

    This is the object invoked whenever a service command
    help is implemented, e.g. ``aws ec2 help``.

    cCs5tt|�j||||�||_||_dS(N(RR�Rt_namet_event_class(RRWRXRYRZRPR_((s//usr/lib/python2.7/site-packages/awscli/help.pyRPs	cCs|jS(N(R�(R((s//usr/lib/python2.7/site-packages/awscli/help.pyR_WscCs|jS(N(R�(R((s//usr/lib/python2.7/site-packages/awscli/help.pyRP[s(	RRR7RReRRoR_RP(((s//usr/lib/python2.7/site-packages/awscli/help.pyR�Fs
	tOperationHelpCommandcBs;eZdZeZd�Zed��Zed��ZRS(s�Implements operation level help.

    This is the object invoked whenever help for a service is requested,
    e.g. ``aws ec2 describe-instances help``.

    cCs;tj|||d|�t�|_||_||_dS(N(RURR:Rtparam_shorthandR�R�(RRWtoperation_modelRZRPR_((s//usr/lib/python2.7/site-packages/awscli/help.pyRis	cCs|jS(N(R�(R((s//usr/lib/python2.7/site-packages/awscli/help.pyR_pscCs|jS(N(R�(R((s//usr/lib/python2.7/site-packages/awscli/help.pyRPts(	RRR7RReRRoR_RP(((s//usr/lib/python2.7/site-packages/awscli/help.pyR�`s
	RzcBs5eZeZd�Zed��Zed��ZRS(cCs#tt|�j|dii�dS(N(RRzRR:(RRW((s//usr/lib/python2.7/site-packages/awscli/help.pyR|scCsdS(NRy((R((s//usr/lib/python2.7/site-packages/awscli/help.pyR_scCsdS(NRy((R((s//usr/lib/python2.7/site-packages/awscli/help.pyRP�s(RRRReRRoR_RP(((s//usr/lib/python2.7/site-packages/awscli/help.pyRzys	R|cBs5eZeZd�Zed��Zed��ZRS(cCs,tt|�j|dii�||_dS(N(RR|RR:t_topic_name(RRWR((s//usr/lib/python2.7/site-packages/awscli/help.pyR�scCsd|jS(Nstopics.(RP(R((s//usr/lib/python2.7/site-packages/awscli/help.pyR_�scCs|jS(N(R�(R((s//usr/lib/python2.7/site-packages/awscli/help.pyRP�s(RRRReRRoR_RP(((s//usr/lib/python2.7/site-packages/awscli/help.pyR|�s	(/tloggingR!R8RR#t
subprocessRRt
docutils.coreRtdocutils.writersRtawscli.clidocsRRRRRtawscli.bcdocR	tawscli.bcdoc.restdocR
tawscli.bcdoc.textwriterRtawscli.argprocessRtawscli.argparserR
tawscli.topictagsRtawscli.utilsRt	getLoggerR.t	ExceptionRRtobjectRRRRURpR�R�RzR|(((s//usr/lib/python2.7/site-packages/awscli/help.pyt<module>
s>	*1o2