| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/prompt_toolkit/input/__pycache__/ |
Upload File : |
�
�Ïc� � � � d dl Z d dlZd dlmZmZmZ ddlmZmZm Z ddgZ
d
dee d ed
efd�Zd
ee fd�Z
dS )� N)�ContextManager�Optional�TextIO� )�
DummyInput�Input� PipeInput�create_input�create_pipe_inputF�stdin�always_prefer_tty�returnc �� � t j dk r9ddlm} | �t j �t � � S || pt j � � S ddlm} | �Lt j } |r>t j t j t j fD ]}|�
� � r|} n� | � � � n## t j
$ r t � � cY S w xY w || � � S )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 )�
Win32InputN)�
Vt100Input)�sys�platformr r r r �vt100r �stdout�stderr�isatty�fileno�io�UnsupportedOperation)r r
r r �objs �?/usr/lib/python3/dist-packages/prompt_toolkit/input/defaults.pyr
r
s � � �|�w���%�%�%�%�%�%� �=�S�Y�.��<�<���z�%�,�3�9�-�-�-�%�%�%�%�%�%� �=��I�E� �
��I�s�z�3�:�>� � �C��z�z�|�|� � #����� ��L�L�N�N�N�N���&� � � ��<�<���� ���� �z�%� � � s �B4 �4C�Cc � � t j dk rddlm} | � � � S ddlm} |� � � S )aA
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 ; sY � � �|�w���.�.�.�.�.�.��$�$�&�&�&�.�.�.�.�.�.��$�$�&�&�&� )NF)r r �typingr r r �baser r r �__all__�boolr
r � r$ r �<module>r* s� �� � � � �
�
�
�
� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� .� .� .� .� .� .� .� .� .� .� ���� ?D�+!� +!��F��+!�7;�+!�
�+!� +!� +!� +!�\'�>�)�4� '� '� '� '� '� 'r$