| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/gi/_glib/ |
Upload File : |
ó
-£´Oc @ s d Z d d l Z d d l Z d d l m Z m Z m Z m Z m Z e j d k rg e Z
d „ Z n e Z
e Z d d l
Z e j d Z d d d
d d d
d d d g Z d
e j f d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ e Z d S( 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 glib.
iÿÿÿÿN( t
OptParseErrort OptionErrort OptionValueErrort BadOptionErrort OptionConflictErrori i c C s
| j ƒ S( N( t encode( t s( ( s3 /usr/lib/python2.7/dist-packages/gi/_glib/option.pyt <lambda>' s s gi._glib._glibR R R R R t Optiont OptionGroupt OptionParsert make_optionc B s_ e Z d Z e j j d Z e j j d d d g Z d e j Z d „ Z
d „ Z d „ 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.
t filenamet hiddent in_maint optional_args --c O s t j j | | | Ž | j s. t d ƒ ‚ n t | j ƒ t | j ƒ k r[ t d ƒ ‚ n | j s} t d | j d ƒ ‚ n d S( 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 ( t optparseR t __init__t
_long_optst
ValueErrort lent _short_optst help( t selft argst kwargs( ( s3 /usr/lib/python2.7/dist-packages/gi/_glib/option.pyR _ s c C si | j | k r% | j j | j ƒ n t j j | | ƒ t | j ƒ t | j ƒ k re t d ƒ ‚ n d S( NsC goption.Option needs more long option names than short option names( t REMAININGR t appendR R t _set_opt_stringR R R ( R t opts( ( s3 /usr/lib/python2.7/dist-packages/gi/_glib/option.pyR l s
c c s# d } | j r | t j O} n | j r8 | t j O} n | j ƒ r` | j rm | t j O} qm n
| t j O} | j d k rŒ | t j
O} n xK t | j | j
ƒ D]4 \ } } | d t | d ƒ | | j | j f Vq¢ WxB | j t | j
ƒ D]* } | d t d ƒ | | j | j f Vqñ Wd S( Ni R i i t ( R
t _glibt OPTION_FLAG_HIDDENR t OPTION_FLAG_IN_MAINt takes_valueR t OPTION_FLAG_OPTIONAL_ARGt OPTION_FLAG_NO_ARGt typet OPTION_FLAG_FILENAMEt zipR R t _bytesR t metavarR ( R t flagst long_namet
short_name( ( s3 /usr/lib/python2.7/dist-packages/gi/_glib/option.pyt _to_goptionentriest s
",( s filename(
t __name__t
__module__t __doc__R R t TYPESt ATTRSR t OPTION_REMAININGR R R R- ( ( ( s3 /usr/lib/python2.7/dist-packages/gi/_glib/option.pyR ; s
c B sJ e Z d Z d d d d d „ Z d „ Z d „ Z d d „ Z d „ Z RS( 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.
t c C sƒ t j j | t d | ƒ | | _ d | _ | | _ | rF | | _ n d | _ | | _
| r x | D] } | j | ƒ qe Wn d S( Nt error( R t OptionContainerR R t namet Nonet parsert help_descriptiont defaultst valuest translation_domaint
add_option( R R7 t descriptionR: t option_listR; R= t option( ( s3 /usr/lib/python2.7/dist-packages/gi/_glib/option.pyR ¢ s
c C s g | _ | j ƒ d S( N( R@ t _create_option_mappings( R ( ( s3 /usr/lib/python2.7/dist-packages/gi/_glib/option.pyt _create_option_list´ s c s ‡ ‡ f d † } t j ˆ j ˆ j ˆ j | ƒ } ˆ j rO | j ˆ j ƒ n g } x$ ˆ j D] } | j | j ƒ ƒ q_ W| j
| ƒ | S( Nc s³ | j d ƒ r ˆ j | } n
ˆ j | } y | j | | ˆ j ˆ ƒ Wnc t k
r® t j ƒ d } t j t
| ƒ ƒ } t j | _ t j
| _ t
| ƒ | _ | ‚ n Xd S( Ns --i ( t
startswitht _long_optt
_short_optt processR<