
    !h                    :   % S SK Jr  S SKJr  S SKJr  S SKJrJr  \(       a  S SKJ	r	  \S   r
\\\S\
4   4   r0 S4     SS	 jjr0 S4     SS
 jjr0 S4     SS jjr0 S4     SS jjr\\\\S.rS\S'    S     SS jjr   S       SS jjrg)    )annotations)Callable)wraps)TYPE_CHECKINGAny)Iterable).N. c                   ^^  SSK Jm  SSKJm  [        [        5      U S4SUU4S jjj5       nU$ ! [         a    SSKJm  SSKJm   N9f = f)zStart an IPython Shellr   )InteractiveShellEmbed)load_default_configr	   c                b   > T" 5       nTR                  5         TR                  XUS9nU" 5         g )N)banner1user_nsconfig)clear_instanceinstance)	namespacebannerr   shellr   r   s       [/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/scrapy/utils/console.pywrapper%_embed_ipython_shell.<locals>.wrapper   s:    $&
 	,,.%..f / 
 	    r   dict[str, Any]r   strreturnNone)	IPython.terminal.embedr   IPython.terminal.ipappr   ImportErrorIPython.frontend.terminal.embedIPython.frontend.terminal.ipappr   _embed_ipython_shell)r   r   r   r   r   s      @@r   r$   r$      sT    	
@>  ,5R 
 
 !
 N+  
	
	
	
s   1 A
	A
c                L   ^ SSK m[        [        5      U S4SU4S jjj5       nU$ )zStart a bpython shellr   Nr	   c                $   > TR                  XS9  g )N)locals_r   )embed)r   r   bpythons     r   r   %_embed_bpython_shell.<locals>.wrapper3   s    i7r   r   )r)   r   _embed_bpython_shell)r   r   r   r)   s      @r   r+   r+   -   s1     
 ,5R 8 8 !8 Nr   c                L   ^ SSK m[        [        5      U S4SU4S jjj5       nU$ )zStart a ptpython shellr   Nr	   c                N   > [        U5        TR                  R                  U S9  g )N)locals)printreplr(   )r   r   ptpythons     r   r   &_embed_ptpython_shell.<locals>.wrapper@   s    f9-r   r   )ptpython.replr   _embed_ptpython_shell)r   r   r   r1   s      @r   r4   r4   :   s1     
 !,5R . . ". Nr   c                   ^ SSK m SSKnSSKnUR                  S5        [        [        5      U S4SU4S jjj5       nU$ ! [         a     N,f = f)zStart a standard python shellr   Nztab:completer	   c                $   > TR                  XS9  g )N)r   local)interact)r   r   codes     r   r   &_embed_standard_shell.<locals>.wrapperW   s    V5r   r   )r9   readlinerlcompleterparse_and_bindr!   r   _embed_standard_shell)r   r   r;   r<   r   r9   s        @r   r>   r>   H   s`     0 	/
 !,5R 6 6 "6 N  s   A   
AA)r1   ipythonr)   pythonKnownShellsTDEFAULT_PYTHON_SHELLSNc                    U c  [         R                  5       n Uc  [         R                  5       nU  H  nX!;   d  M
   X   " 5       s  $    g! [         a     M&  f = f)zSReturn the first acceptable shell-embed function
from a given list of shell names.
N)rB   keyscopyr!   )shellsknown_shellsr   s      r   get_shell_embed_funcrH   f   sg     ~&++-,113  $*,,    s   A


AAc                Z    U c  0 n  [        U5      nUb  U" XS9  gg! [         a     gf = f)z{Start Python console bound to the given namespace.
Readline support and tab completion will be used on Unix, if available.
N)r   r   )rH   
SystemExit)r   r   rF   r   s       r   start_python_consolerK   {   sC     	$V,I5  s    
**)r   r   r   r   r   
EmbedFuncT)NN)rF   Iterable[str] | NonerG   zKnownShellsT | Noner   zEmbedFuncT | None)Nr	   N)r   zdict[str, Any] | Noner   r   rF   rM   r   r   )
__future__r   collections.abcr   	functoolsr   typingr   r   r   rL   dictr   rA   r$   r+   r4   r>   rB   __annotations__rH   rK    r   r   <module>rU      s?   " $  %(i 
C#z/223 !#",/@ !#"

,/

 !#",/ !#",/. &###	' |  NR 7J, (,#'$ ! 
	r   