
    ^h	                    d    S SK Jr  S SKrS SKrS SKJrJr  SSKJrJ	r	J
r
  SS/rS
SS jjrSS	 jrg)    )annotationsN)ContextManagerTextIO   )
DummyInputInput	PipeInputcreate_inputcreate_pipe_inputc                   [         R                  S:X  aC  SSKJn  U c  [         R                  c
  [        5       $ U" U =(       d    [         R                  5      $ SSKJn  U cf  [         R                  n U(       aO  [         R                  [         R                  [         R                  4 H  nUR                  5       (       d  M  Un   O    U R                  5         U" U 5      $ ! [        R                   a    [        5       s $ f = f)a  
Create the appropriate `Input` object for the current os/environment.

:param always_prefer_tty: When set, if `sys.stdin` is connected to a Unix
    `pipe`, check whether `sys.stdout` or `sys.stderr` are connected to a
    pseudo terminal. If so, open the tty for reading instead of reading for
    `sys.stdin`. (We can open `stdout` or `stderr` for reading, this is how
    a `$PAGER` works.)
win32r   )
Win32Input)
Vt100Input)sysplatformr   r   stdinr   vt100r   stdoutstderrisattyfilenoioUnsupportedOperation)r   always_prefer_ttyr   r   objs        W/home/james-whalen/.local/lib/python3.13/site-packages/prompt_toolkit/input/defaults.pyr
   r
      s     ||w% =SYY.<%,399--% =IIE IIszz3::>Czz|| # ?	 LLN %   && 	 <	 s   C   D Dc                     [         R                  S:X  a  SSKJn   U R	                  5       $ SSKJn  UR	                  5       $ )a!  
Create an input pipe.
This is mostly useful for unit testing.

Usage::

    with create_pipe_input() as input:
        input.send_text('inputdata')

Breaking change: In prompt_toolkit 3.0.28 and earlier, this was returning
the `PipeInput` directly, rather than through a context manager.
r   r   )Win32PipeInput)PosixPipeInput)r   r   
win32_piper   create
posix_piper   )r   r   s     r   r   r   ;   s4     ||w.$$&&.$$&&    )NF)r   zTextIO | Noner   boolreturnr   )r%   zContextManager[PipeInput])
__future__r   r   r   typingr   r   baser   r   r	   __all__r
   r    r#   r   <module>r+      s1    " 	 
 ) . . )!X'r#   