+
    eH                     j    R t ^ RIt^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 Rt]R3R ltR tR# )z
Utilities for end-users.
N)
namedtuple)InterpreterFc                  a a \         '       d(   \        P                  ! RR\        P                  R7        ! VV 3R lR4      p ^ RIp^ RIpVP                  V! 4       P                  4       VP                  R4       VP                  R4       VP                  R	4       VP                  R
4       VP                  R4       VP                  R4       R#   \         d    \        R4        R# i ; i)a	  
This function sets up :mod:`readline` to use Jedi in a Python interactive
shell.

If you want to use a custom ``PYTHONSTARTUP`` file (typically
``$HOME/.pythonrc.py``), you can add this piece of code::

    try:
        from jedi.utils import setup_readline
    except ImportError:
        # Fallback to the stdlib readline completer if it is installed.
        # Taken from http://docs.python.org/2/library/rlcompleter.html
        print("Jedi is not installed, falling back to readline")
        try:
            import readline
            import rlcompleter
            readline.parse_and_bind("tab: complete")
        except ImportError:
            print("Readline is not installed either. No tab completion is enabled.")
    else:
        setup_readline()

This will fallback to the readline completer if Jedi is not installed.
The readline completer will only complete names in the global namespace,
so for example::

    ran<TAB>

will complete to ``range``.

With Jedi the following code::

    range(10).cou<TAB>

will complete to ``range(10).count``, this does not work with the default
cPython :mod:`readline` completer.

You will also need to add ``export PYTHONSTARTUP=$HOME/.pythonrc.py`` to
your shell profile (usually ``.bash_profile`` or ``.profile`` if you use
bash).
z/tmp/jedi.loga)filenamefilemodelevelc                   0   <a  ] tR t^Dt o VV3R ltRtV tR# )setup_readline.<locals>.JediRLc                  < V^ 8X  Ed    \         P                  P                  ^ \        P                  ! 4       4        \
        P                  ! R\        V4      ,           4       \        VSP                  .4      pVP                  SR7      p\
        P                  ! RV4       V Uu. uF3  pVR\        V4      VP                  ,
           VP                  ,           NK5  	  upV n         \         P                  P%                  ^ 4        V P                  V,          # u upi    \
        P                  ! R\         P"                  ! 4       ,           4       h ; i  \         P                  P%                  ^ 4       i ; i  \&         d     R# i ; i)a+  
This complete stuff is pretty weird, a generator would make
a lot more sense, but probably due to backwards compatibility
this is still the way how it works.

The only important part is stuff in the ``state == 0`` flow,
everything else has been copied from the ``rlcompleter`` std.
library module.
zStart REPL completion: )fuzzyzREPL completions: %sNzREPL Completion error:
)syspathinsertosgetcwdloggingdebugreprr   __dict__completelen_like_name_lengthname_with_symbolsmatcheserror	traceback
format_excpop
IndexError)selftextstateinterpretercompletionscr   namespace_modules   &&&   ,/usr/lib/python3/dist-packages/jedi/utils.pyr   'setup_readline.<locals>.JediRL.completeE   s/    z299;/$MM";d4j"HI"-d5E5N5N4O"PK"-"6"6U"6"CKMM"8+F "-$!,A =c$i!*=*==>ATATTT!,$DL HHLLO||E**$MM"<y?S?S?U"UVHHLLO  s<   A*D" (9D!D" 
E< D" "3EE !E9<F
F)r   N)__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell__)__classdict__r   r&   s   @r'   JediRLr
   D   s      	  	    r0   Nztab: completezset completion-ignore-case onzset show-all-if-unmodifiedzset show-all-if-ambiguous onz&set completion-prefix-display-length 2 z$Jedi: Module readline not available.)READLINE_DEBUGr   basicConfigDEBUGrlcompleterreadlineset_completerr   parse_and_bindset_completer_delimsImportErrorprint)r&   r   r0   r6   r7   s   ff   r'   setup_readliner=      s    T ~$--	
! !F*
 	 	vx0010 ?@ <= >? HI%%b)  6456s   C C/.C/c            	         \        RR4      p ^ RIHp \        P                  ! RV4      pT ! \        V4       UUu. uF  w  r4V^8X  d   TM
\        V4      NK  	  upp!  # u uppi )zS
Returns a namedtuple of Jedi's version, similar to Python's
``sys.version_info``.
Versionzmajor, minor, micro)__version__z
[a-z]+|\d+)r   jedir@   refindall	enumerateint)r?   r@   tuplixs        r'   version_inforI   ~   sV    
 $9:G ::m[1D4I!q&Qc!f,IJJIs   A
)__doc____main__collectionsr   r   r   rB   r   r   rA   r   r3   r=   rI    r1   r'   <module>rN      s?     "   	 	 
   %-E h*VKr1   