
    "ej                     <     G d  de       Zg fdZd Zd Zd Zd Zy)c                   "    e Zd ZdZdZddZd Zy)GetoptError c                 N    || _         || _        t        j                  | ||       y N)msgopt	Exception__init__)selfr   r   s      =/usr/lib/python3/dist-packages/_pydev_bundle/_pydev_getopt.pyr
   zGetoptError.__init__   s"    4c*    c                     | j                   S r   )r   )r   s    r   __str__zGetoptError.__str__   s    xxr   N)r   )__name__
__module____qualname__r   r   r
   r    r   r   r   r      s    
C
C+
r   r   c                    g }g }t        d      t        |      k(  r|g}nt        |      }d}|j                  d      r|dd }d}| r| d   dk(  r|| dd z  }	 ||fS | d   dd	 dk(  rt        || d   d	d || dd       \  }} nK| d   dd d
k(  rt	        || d   dd || dd       \  }} n%|r
|| z  }	 ||fS |j                  | d          | dd } | r||fS )a  getopt(args, options[, long_options]) -> opts, args

    This function works like getopt(), except that GNU style scanning
    mode is used by default. This means that option and non-option
    arguments may be intermixed. The getopt() function stops
    processing options as soon as a non-option argument is
    encountered.

    If the first character of the option string is `+', or if the
    environment variable POSIXLY_CORRECT is set, then option
    processing stops as soon as a non-option argument is encountered.
    r   F+   NT    --   -)typelist
startswithdo_longs	do_shortsappend)args	shortoptslongoptsopts	prog_argsall_options_firsts         r   
gnu_getoptr'      s<    DIBx4>!:> C abM	 
7d?ab!I ? 72A;$!$QXtABxHJD$!WRa[C"4aiabJJD$ T!	
 ?   a)ABx " ?r   c                    	 |j                  d      }|d | ||dz   d  }}t        ||      \  }}|r|-|st        d|z  |      |d   |dd  }}n|rt        d|z  |      | j	                  d|z   |xs df       | |fS # t        $ r d }Y kw xY w)N=r   zoption --%s requires argumentr   z%option --%s must not have an argumentr   r   )index
ValueErrorlong_has_argsr   r    )r$   r   r#   r!   ioptarghas_args          r   r   r   ?   s    +IIcN "1gs1q56{V h/LGS>!"AC"GMM7DHDF	ACGMMKKV\r*+:  s   A> >BBc                 2   |D cg c]  }|j                  |       s| }}|st        d| z  |       | |v rd| fS | dz   |v rd| fS t        |      dkD  rt        d| z  |       t        |      dk(  sJ |d   }|j                  d      }|r|d d }||fS c c}w )	Nzoption --%s not recognizedFr)   Tr   zoption --%s not a unique prefixr   )r   r   lenendswith)r   r#   opossibilitiesunique_matchr/   s         r   r,   r,   U   s     (>1ALL,=Q>M>6<cBB
mcz	sm	#Sy
=A ;cA3GG}""" #L##C(G#CR(L  % ?s
   BBc                     |dk7  rY|d   |dd  }}t        ||      r%|dk(  r|st        d|z  |      |d   |dd  }}|d}}nd}| j                  d|z   |f       |dk7  rY| |fS )Nr   r   r   zoption -%s requires argumentr   )short_has_argr   r    )r$   	optstringr"   r!   r   r.   s         r   r   r   j   s    
r/"1y}Yi(B%&Ds&J&)+ +"&q'484	 )2IFFS3Y'( r/ :r   c                     t        t        |            D ]*  }| ||   cxk(  rdk7  sn |j                  d|dz         c S  t        d| z  |       )N:r   zoption -%s not recognized)ranger2   r   r   )r   r"   r-   s      r   r8   r8   y   sW    3y>" 4)A,%#%''QU334 1C7
==r   N)r	   r   r'   r   r,   r   r8   r   r   r   <module>r=      s0   
	) 	 *, ,\,!*>r   