-=[ Mr. Bumblebee ]=-
_Indonesia_
($Oc @@ sK d Z d d l m Z d d l Z d d l m Z e e d e d e d e d e d e d
e d e d e d
e Z
e e
d <e e
d <e d Z d e
f d YZ d e
f d YZ d e f d YZ d e f d YZ d e f d YZ e Z d Z d e
f d YZ d e
f d YZ d S( s Abstraction for interacting with the user.
Applications can choose different types of UI, and they deal with displaying
messages or progress to the user, and with gathering different types of input.
Several levels are supported, and you can also register new factories such as
for a GUI.
bzrlib.ui.UIFactory
Semi-abstract base class
bzrlib.ui.SilentUIFactory
Produces no output and cannot take any input; useful for programs using
bzrlib in batch mode or for programs such as loggerhead.
bzrlib.ui.CannedInputUIFactory
For use in testing; the input values to be returned are provided
at construction.
bzrlib.ui.text.TextUIFactory
Standard text command-line interface, with stdin, stdout, stderr.
May make more or less advanced use of them, eg in drawing progress bars,
depending on the detected capabilities of the terminal.
GUIs may choose to subclass this so that unimplemented methods fall
back to working through the terminal.
i ( t absolute_importN( t lazy_importsN
from bzrlib import (
config,
osutils,
progress,
trace,
)
t yest not yt nt ont offt truet falset 1t 0c C@ sb | d k r t } n d } t | t t f k r^ y | | j } Wq^ t k
rZ q^ Xn | S( s Returns a boolean if the string can be interpreted as such.
Interpret case insensitive strings as booleans. The default values
includes: 'yes', 'no, 'y', 'n', 'true', 'false', '0', '1', 'on',
'off'. Alternative values can be provided with the 'accepted_values'
parameter.
:param s: A string that should be interpreted as a boolean. It should be of
type string or unicode.
:param accepted_values: An optional dict with accepted strings as keys and
True/False as values. The strings will be tested against a lowered
version of 's'.
:return: True or False for accepted strings, None otherwise.
N( t Nonet _valid_boolean_stringst typet strt unicodet lowert KeyError( t st accepted_valuest val( ( s6 /usr/lib/python2.7/dist-packages/bzrlib/ui/__init__.pyt bool_from_stringC s
t ConfirmationUserInterfacePolicyc B@ s2 e Z d Z d Z d Z d Z d Z RS( sD Wrapper for a UIFactory that allows or denies all confirmed actions.c C@ s | | _ | | _ | | _ d S( sS Generate a proxy UI that does no confirmations.
:param wrapped_ui: Underlying UIFactory.
:param default_answer: Bool for whether requests for
confirmation from the user should be noninteractively accepted or
denied.
:param specific_answers: Map from confirmation_id to bool answer.
N( t
wrapped_uit default_answert specific_answers( t selfR R R ( ( s6 /usr/lib/python2.7/dist-packages/bzrlib/ui/__init__.pyt __init__b s c C@ s t | j | S( N( t getattrR ( R t name( ( s6 /usr/lib/python2.7/dist-packages/bzrlib/ui/__init__.pyt __getattr__o s c C@ s# d | j j | j | j | j f S( Ns %s(%r, %r, %r)( t __class__t __name__R R R ( R ( ( s6 /usr/lib/python2.7/dist-packages/bzrlib/ui/__init__.pyt __repr__r s
c C@ sJ | | j k r | j | S| j d k r0 | j S| j j | | | Sd S( N( R R R R t confirm_action( R t promptt confirmation_idt
prompt_kwargs( ( s6 /usr/lib/python2.7/dist-packages/bzrlib/ui/__init__.pyR# y s ( R! t
__module__t __doc__R R R"