⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
gi
/
__pycache__
/
View File Name :
_option.cpython-310.pyc
o f_T3 @ s d Z ddlZddlZddlmZmZmZmZmZ ddlm Z ddl mZ ddlm Z e dZee Zg d ZG d d dejZG dd d ejZG dd dejZeZdS )a, GOption command line parser Extends optparse to use the GOptionGroup, GOptionEntry and GOptionContext objects. So it is possible to use the gtk, gnome_program and gstreamer command line groups and contexts. Use this interface instead of the raw wrappers of GOptionContext and GOptionGroup in glib. N) OptParseErrorOptionErrorOptionValueErrorBadOptionErrorOptionConflictError )get_introspection_module)_gi)GErrorGLib) r r r r r OptionOptionGroupOptionParsermake_optionc @ sN e Zd ZdZejjd Zejjg d Zdej Z dd Zdd Zd d Z dS )r a Represents a command line option To use the extended possibilities of the GOption API Option (and make_option) are extended with new types and attributes. Types: filename The supplied arguments are read as filename, GOption parses this type in with the GLib filename encoding. :ivar optional_arg: This does not need a arguement, but it can be supplied. :ivar hidden: The help list does not show this option :ivar in_main: This option apears in the main group, this should only be used for backwards compatibility. Use Option.REMAINING as option name to get all positional arguments. .. NOTE:: Every argument to an option is passed as utf-8 coded string, the only exception are options which use the 'filename' type, its arguments are passed as strings in the GLib filename encoding. For further help, see optparse.Option. )filename)hiddenin_mainoptional_arg--c O s^ t jj| g|R i | | jstdt| jt| jk r"td| js-td| jd d S )Nz!%s at least one long option name.z;%s at least more long option names than short option names.z%s needs a help message.r )optparser __init__ _long_opts ValueErrorlen_short_optshelpselfargskwargs r ,/usr/lib/python3/dist-packages/gi/_option.pyr ^ s zOption.__init__c C sF | j |v r| j| j tj| | t| jt| jkr!tdd S )NzCgoption.Option needs more long option names than short option names) REMAININGr appendr r _set_opt_stringr r r )r Zoptsr r r! r$ j s zOption._set_opt_stringc c s d}| j r|tjjO }| jr|tjjO }| r#| jr"|tjjO }n|tjj O }| j dkr4|tjjO }t| j | jD ] \}}|d }t|tsM|d}|dd ||| j| jfV q;| j t| jd D ]}|dd d|| j| jfV qfd S )Nr r r zutf-8 )r r ZOptionFlagsZHIDDENr ZIN_MAINZtakes_valuer ZOPTIONAL_ARGZNO_ARGtypeZFILENAMEzipr r isinstancebytesencoder metavarr )r flagsZ long_nameZ short_nameZshort_bytesr r r! _to_goptionentriesr s* zOption._to_goptionentriesN)__name__ __module____qualname____doc__r r ZTYPESZATTRSr ZOPTION_REMAININGr" r r$ r. r r r r! r 7 s r c @ sB e Zd ZdZ dddZdd Zdd Zdd dZdd ZdS )r a A group of command line options. :param str name: The groups name, used to create the --help-{name} option :param str description: Shown as title of the groups help view :param str help_description: Shown as help to the --help-{name} option :param list option_list: The options used in this group, must be option.Option() :param dict defaults: A dicitionary of default values :param translation_domain: Sets the translation domain for gettext(). .. NOTE:: This OptionGroup does not exactly map the optparse.OptionGroup interface. There is no parser object to supply, but it is possible to set default values and option_lists. Also the default values and values are not shared with the OptionParser. To pass a OptionGroup into a function which expects a GOptionGroup (e.g. gnome_program_init() ). OptionGroup.get_option_group() can be used. For further help, see optparse.OptionGroup. Nc C sZ t j| td| || _d | _|| _|r|| _d | _|| _ |r)|D ] }| | q!d S d S )Nerror)r ZOptionContainerr r nameparserhelp_descriptiondefaultsvaluestranslation_domainZ add_option)r r5 descriptionr7 option_listr8 r: optionr r r! r s zOptionGroup.__init__c C s g | _ | d S N)r<