/usr/lib/python2.6/site-packages/cliff
Edit: /usr/lib/python2.6/site-packages/cliff/interactive.pyc (5417B)
Ñò
yDVc @ sz d Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z e i e ƒ Z d e i
f d „ ƒ YZ d S( s Application base class.
iÿÿÿÿNt InteractiveAppc B sz e Z d Z e Z d Z d Z d „ Z d „ Z d „ Z d „ Z
d „ Z d „ Z d „ Z
d
„ Z d „ Z d „ Z RS(
sG Provides "interactive mode" features.
Refer to the cmd2_ and cmd_ documentation for details
about subclassing and configuring this class.
.. _cmd2: http://packages.python.org/cmd2/index.html
.. _cmd: http://docs.python.org/library/cmd.html
:param parent_app: The calling application (expected to be derived
from :class:`cliff.main.App`).
:param command_manager: A :class:`cliff.commandmanager.CommandManager`
instance.
:param stdin: Standard input stream
:param stdout: Standard output stream
s# Shell commands (type help
):s) Application commands (type help ):c C sv | | _ t t i d ƒ p t i i ƒ o d | i | _ n
d | _ | | _ t i i
| d d | d | ƒd S( Nt isattys (%s) t t tabt stdint stdout( t
parent_appt hasattrt sysR R t NAMEt promptt command_managert cmd2t Cmdt __init__( t selfR R R R ( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyR $ s $ c C s) t i | i i ƒ } | i i | ƒ d S( N( t shlext splitt parsedt rawR t run_subcommand( R t linet
line_parts( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyt default. s c G s/ t i i | | | Œ } | | i | ƒ 7} | S( s¸ Tab-completion for command prefix without completer delimiter.
This method returns cmd style and cliff style commands matching
provided command prefix (text).
( R R
t
completenamest _complete_prefix( R t textt ignoredt completions( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyR 7 s c C s, g } | i | ƒ D] } | | | q ~ S( s² Default tab-completion for command prefix with completer delimiter.
This method filters only cliff style commands matching provided
command prefix (line) as cmd2 style commands cannot contain spaces.
This method returns text + missing command part of matching commands.
This method does not handle options in cmd2/cliff style commands, you
must define complete_$method to handle them.
( R ( R R R t begidxt endidxt _[1]t x( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyt completedefaultA s c C sl | p) g } | i D] \ } } | | q ~ Sg } | i D]' \ } } | i | ƒ o | | q> q> ~ S( s4 Returns cliff style commands with a specific prefix.( R t
startswith( R t prefixR t nt vt _[2]( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyR L s )c C s | i d ƒ d S( Ns help help( R ( R ( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyt help_helpR s c C så | o~ t i | ƒ } d i t i d g t i d „ | ƒ ƒ ƒ } t | | ƒ o t i i | | ƒ S| i
| i d | ƒ ƒ n] t i i | | ƒ t g } | i
D] \ } } | | q© ~ ƒ } | i | i | d d ƒ d S( Nt _t doc S s | i d ƒ S( t -( R" ( R ( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyt ^ s s help i iP ( R R t joint itertoolst chaint takewhileR R R
t do_helpR R t sortedR t print_topicst app_cmd_header( R t argt arg_partst method_nameR R$ R% t cmd_names( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyR0 V s 0c C s? g } t i i | ƒ D]! } | i d ƒ p | | q q ~ S( Nt do__( R R
t get_namesR" ( R R R$ ( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyR9 q s c C su t i | i i ƒ } y% | i i | ƒ } | \ } } } Wn t j
o n# X| | i _ d i | ƒ | i _ | S( Nt (
R R R R R t find_commandt
ValueErrort commandR, t args( R t statementR t the_cmdt cmd_factoryt cmd_namet sub_argv( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyt precmdz s c C s | i ƒ d S( N( t _cmdloop( R ( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyt cmdloopŠ s ( t __name__t
__module__t __doc__t Truet use_rawinputt
doc_headerR3 R R R R! R R' R0 R9 RD RF ( ( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyR s
( RI R- t loggingt logging.handlersR R R t getLoggerRG t LOGR
R ( ( ( s0 /tmp/pip-build-lt8jXN/cliff/cliff/interactive.pyt s