|
Server : LiteSpeed System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : elvh3918 ( 1528) PHP Version : 8.2.31 Disable Function : mail Directory : /usr/local/lib/python3.9/site-packages/prompt_toolkit/output/__pycache__/ |
a
��Shi � @ s� d dl mZ d dlZd dlmZmZmZ d dlmZm Z m
Z
ddlmZm
Z
ddlmZ ddlmZ ertd d lmZ d
gZddd
dd�dd
�ZdS )� )�annotationsN)�
TYPE_CHECKING�TextIO�cast)�get_bell_environment_variable�get_term_environment_variable�is_conemu_ansi� )�DummyOutput�Output)�
ColorDepth)�PlainTextOutput��StdoutProxy�
create_outputFzTextIO | StdoutProxy | None�boolr )�stdout�always_prefer_tty�returnc C s t � }t� }t�� }| du rPtj} |rPtjtjfD ]}|dur2|�� r2|} qPq2ddlm } t
| |�rn| j} q\| du r|t� S tj
dkr�ddlm} ddlm} ddlm} m}
|
� r�tt| | |d ��S t� r�tt|| |d ��S || |d �S n0dd
lm} | �� �s
t| �S |j| |||d�S dS )aX
Return an :class:`~prompt_toolkit.output.Output` instance for the command
line.
:param stdout: The stdout object
:param always_prefer_tty: When set, look for `sys.stderr` if `sys.stdout`
is not a TTY. Useful if `sys.stdout` is redirected to a file, but we
still want user input and output on the terminal.
By default, this is `False`. If `sys.stdout` is not a terminal (maybe
it's redirected to a file), then a `PlainTextOutput` will be returned.
That way, tools like `print_formatted_text` will write plain text into
that file.
Nr r �win32r )�ConEmuOutput)�Win32Output)�Windows10_Output�is_win_vt100_enabled)�default_color_depth)�Vt100_Output)Ztermr Zenable_bell)r r r Zfrom_env�sysr �stderr�isatty�prompt_toolkit.patch_stdoutr �
isinstanceZoriginal_stdoutr
�platformZconemur r r Z windows10r r r r r Zvt100r r
Zfrom_pty)r r Z
term_from_envZ
bell_from_envZcolor_depth_from_env�ior r r r r r � r# �H/usr/local/lib/python3.9/site-packages/prompt_toolkit/output/defaults.pyr sL
��
�)NF)�
__future__r r �typingr r r Zprompt_toolkit.utilsr r r �baser
r Zcolor_depthr Z
plain_textr
r r �__all__r r# r# r# r$ �<module> s � �