AlkantarClanX12
Current Path : /proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/ |
Current File : //proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/getopt.cpython-33.pyo |
� ��f@ c @ s d Z d d d d g Z d d l Z y d d l m Z Wn e k rX d d � Z Yn XGd d � d e � Z e Z g d d � Z g d d � Z d d � Z d d � Z d d � Z d d � Z e d k rd d l Z e e e j d d � d d d g � � n d S( u� Parser for command line options. This module helps scripts to parse the command line arguments in sys.argv. It supports the same conventions as the Unix getopt() function (including the special meanings of arguments of the form `-' and `--'). Long options similar to those supported by GNU software may be used as well via an optional third argument. This module provides two functions and an exception: getopt() -- Parse command line options gnu_getopt() -- Like getopt(), but allow option and non-option arguments to be intermixed. GetoptError -- exception (class) raised with 'opt' attribute, which is the option involved with the exception. u GetoptErroru erroru getoptu gnu_getopti N( u gettextc C s | S( N( ( u s( ( u+ /opt/alt/python33/lib64/python3.3/getopt.pyu _) s u _c B s; | Ee Z d Z d Z d Z d d d � Z d d � Z d S( u GetoptErroru c C s) | | _ | | _ t j | | | � d S( N( u msgu optu Exceptionu __init__( u selfu msgu opt( ( u+ /opt/alt/python33/lib64/python3.3/getopt.pyu __init__. s u GetoptError.__init__c C s | j S( N( u msg( u self( ( u+ /opt/alt/python33/lib64/python3.3/getopt.pyu __str__3 s u GetoptError.__str__N( u __name__u __module__u __qualname__u optu msgu __init__u __str__( u __locals__( ( u+ /opt/alt/python33/lib64/python3.3/getopt.pyu GetoptError+ s c C s g } t | � t d � k r* | g } n t | � } x� | r| d j d � r| d d k r| d d k r� | d d � } Pn | d j d � r� t | | d d d � | | d d � � \ } } q9 t | | d d d � | | d d � � \ } } q9 W| | f S( u@ getopt(args, options[, long_options]) -> opts, args Parses command line options and parameter list. args is the argument list to be parsed, without the leading reference to the running program. Typically, this means "sys.argv[1:]". shortopts is the string of option letters that the script wants to recognize, with options that require an argument followed by a colon (i.e., the same format that Unix getopt() uses). If specified, longopts is a list of strings with the names of the long options which should be supported. The leading '--' characters should not be included in the option name. Options which require an argument should be followed by an equal sign ('='). The return value consists of two elements: the first is a list of (option, value) pairs; the second is the list of program arguments left after the option list was stripped (this is a trailing slice of the first argument). Each option-and-value pair returned has the option as its first element, prefixed with a hyphen (e.g., '-x'), and the option argument as its second element, or an empty string if the option has no argument. The options occur in the list in the same order in which they were found, thus allowing multiple occurrences. Long and short options may be mixed. u i u -u --i Ni ( u typeu listu startswithu do_longsu do_shorts( u argsu shortoptsu longoptsu opts( ( u+ /opt/alt/python33/lib64/python3.3/getopt.pyu getopt8 s ,67c C s� g } g } t | t � r'