KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/site-packages/gtk-2.0/gobject/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/site-packages/gtk-2.0/gobject/option.pyo
mò
t~øEc@s˜dZdkZdkZdklZdkZdddddgZdeifd„ƒYZdeifd	„ƒYZdei	fd
„ƒYZ	eZ
dS(s/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 gobject.
N(sOptionErrortOptionErrortOptiontOptionGrouptOptionParsertmake_optioncBs_tZdZeiid	ZeiidddgZdeiZ	d„Z
d„Zd„ZRS(
s¼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.

    Attributes:
        optional_arg  This does not need a arguement, but it can be supplied.
        hidden        The help list does not show this option
        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.
    tfilenamethiddentin_maintoptional_args--cOs‡tii|||Ž|iptdƒ‚nt|iƒt|i	ƒjotdƒ‚n|i
ptd|idƒ‚ndS(Ns!%s at least one long option name.s;%s at least more long option names than short option names.s%s needs a help message.i(toptparseRt__init__tselftargstkwargst
_long_optst
ValueErrortlent_short_optsthelp(RRR
((t</usr/lib64/python2.4/site-packages/gtk-2.0/gobject/option.pyR
Qs

cCsm|i|jo|ii|iƒntii||ƒt|i	ƒt|iƒjot
dƒ‚ndS(NsCgoption.Option needs more long option names than short option names(Rt	REMAININGtoptsRtappendR	Rt_set_opt_stringRRR(RR((RR]s
ccs)d}|io|itiO_n|io|itiO_n|iƒo|io|ti	O}qn|ti
O}|idjo|tiO}nxDt
|i|iƒD]-\}}|d|d||i|ifVq¶Wx;|it|iƒD]#}|dd||i|ifVqþWdS(NiRiit(tflagsRRtgobjecttOPTION_FLAG_HIDDENRtOPTION_FLAG_IN_MAINttakes_valueRtOPTION_FLAG_OPTIONAL_ARGtOPTION_FLAG_NO_ARGttypetOPTION_FLAG_FILENAMEtzipRRt	long_namet
short_nameRtmetavarR(RR$R#R((Rt_to_goptionentrieses"




%(sfilename(
t__name__t
__module__t__doc__R	RtTYPEStATTRSRtOPTION_REMAININGRR
RR&(((RR-s
		cBsJtZdZdeeed„Zd„Zd„Zed„Zd„ZRS(s¾A group of command line options.

    Arguements:
       name:             The groups name, used to create the --help-{name} option
       description:      Shown as title of the groups help view
       help_description: Shown as help to the --help-{name} option
       option_list:      The options used in this group, must be option.Option()
       defaults:         A dicitionary of default values
       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.
    tcCs|tii|td|ƒ||_d|_||_	|o
||_
nd|_||_x|D]}|i|ƒqaWdS(Nterror(R	tOptionContainerR
RRtdescriptiontnametNonetparserthelp_descriptiontdefaultstvaluesttranslation_domaintoption_listtoptiont
add_option(RR1R0R4R8R5R7R9((RR
’s			
		cCsg|_|iƒdS(N(RR8t_create_option_mappings(R((Rt_create_option_list£s	csŒ‡‡d†}tiˆiˆiˆi|ƒ}ˆio|i	ˆiƒng}x$ˆiD]}|i
|iƒƒq^W|i|ƒ|S(NcsK|idƒoˆi|}nˆi|}|i||ˆiˆƒdS(Ns--(
toption_namet
startswithRt	_long_opttoptt
_short_opttprocesstoption_valueR6R3(R=RCtgroupR@(RR3(Rtcallback¨s
(RERRRR1R0R4RDR7tset_translation_domaintentriesR8R9textendR&tadd_entries(RR3RDR9RERG((RR3Rt_to_goptiongroup§s


cCs|iƒ|i|ƒS(sˆ Returns the corresponding GOptionGroup object.
        
        Can be used as parameter for gnome_program_init(), gtk_init().
        N(Rtset_values_to_defaultsRJR3(RR3((Rtget_option_group»s
cCs~xb|iD]W}|ii|iƒ}t|tƒo,|i	ƒ}|i||ƒ|i|i<q
q
Wti
|iƒ|_dS(N(RR8R9R5tgettdesttdefaultt
isinstancet
basestringtget_opt_stringtopt_strtcheck_valueR	tValuesR6(RRSR9RO((RRKÃs
$(	R'R(R)R2R
R<RJRLRK(((RR}s		cBsDtZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(s~Command line parser with GOption support.

    NOTE: The OptionParser interface is not the exactly the same as the
          optparse.OptionParser interface. Especially the usage parameter
          is only used to show the metavar of the arguements.

    Attribues:
        help_enabled:           The --help, --help-all and --help-{group}
                                options are enabled (default).
        ignore_unknown_options: Do not throw a exception when a option is not
                                knwon, the option will be in the result list.
    
    OptionParser.add_option_group() does not only accept OptionGroup instances
    but also gobject.OptionGroup, which is returned by gtk_get_option_group().

    Only gobject.option.OptionGroup and gobject.option.Option instances should
    be passed as groups and options.

    For further help, see optparse.OptionParser.
    cOsed|jot|d<n|idtƒ|_|idtƒ|_ti	i
|dt||ŽdS(Ntoption_classthelp_enabledtignore_unknown_optionstadd_help_option(R
RtpoptTrueRRWtFalseRXR	RR
R(RRR
((RR
ás

cCsN|djo
d|_n1|idƒo|tdƒ|_n
||_dS(NR-s%prog(tusageR2RR>R(RR]((Rt	set_usageès


c
sˆioˆidˆi}n
ˆi}ti|ƒ}|iˆiƒ|i	ˆi
ƒxJˆiD]?}t
|tiƒo
|}n|iˆƒ}|i|ƒqdW‡‡d†}tiddd|ƒ}g}	x$ˆiD]}|	i|iƒƒqÞW|i|	ƒ|i|ƒ|S(Ns - csH|idƒoˆi|}nˆi|}|i||ˆˆƒdS(Ns--(	R=R>RR?R@RARBRCR6(R=RCRDR@(RR6(RREs
(RR0R]tparameter_stringRt
OptionContexttcontexttset_help_enabledRWtset_ignore_unknown_optionsRXt
option_groupstoption_groupRPRtg_groupRLt	add_groupRER2t
main_grouptmain_entriesR8R9RHR&RItset_main_group(
RR6R9ReRER_RaRhRfRi((RR6Rt_to_goptioncontextðs*
	




cOst|dtƒo'tii|t|||ŽƒdSn®t	|ƒdjoš|o’t|dtƒoG|di
p||d_
n|di
|j	otdƒ‚q±nt|dtiƒo|i
i|dƒdSqèntii|||ŽdS(Niis"invalid OptionGroup (wrong parser)(RPRRQR	Rtadd_option_groupRRR
RR3RRRdR(RRR
((RRlscCsI|i}x8|iD]-}t|tiƒo|i|iƒqqW|S(N(	RR8toptionsRdRDRPR	RRH(RRDRm((Rt_get_all_options s

cCs7|i|ƒ}|i|itidg|ƒƒdS(Ni(
RRkR6RatlargsRHtparsetsystargvtrargs(RRoRsR6Ra((Rt
_process_args's(	R'R(R)R
R^RkRlRnRt(((RRËs			 		(R)RqR	Rt_gobjectRt__all__RRRR(	RRRvR	RqRRRR((Rt?s		
	PNa

Anon7 - 2021