| 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/pexpect/__pycache__/ |
Upload File : |
�
��!^ � � � d Z ddlZddlZddlZddlZej d dk ZereZ dZ
dZ G d� de� � Z
dd �Zd
d�ZdS )zEGeneric wrapper for read-eval-print-loops, a.k.a. interactive shells
� N� z[PEXPECT_PROMPT>z[PEXPECT_PROMPT+c �6 � e Zd ZdZeedfd�Zd� Zd d�Zd d�Z dS )
�REPLWrappera� Wrapper for a REPL.
:param cmd_or_spawn: This can either be an instance of :class:`pexpect.spawn`
in which a REPL has already been started, or a str command to start a new
REPL process.
:param str orig_prompt: The prompt to expect at first.
:param str prompt_change: A command to change the prompt to something more
unique. If this is ``None``, the prompt will not be changed. This will
be formatted with the new and continuation prompts as positional
parameters, so you can use ``{}`` style formatting to insert them into
the command.
:param str new_prompt: The more unique prompt to expect after the change.
:param str extra_init_cmd: Commands to do extra initialisation, such as
disabling pagers.
Nc �� � t |t � � rt j |dd�� � | _ n|| _ | j j r3| j � d� � | j � � � |�|| _ n1| � ||�
||� � � � || _ || _ | � � � |�| �
|� � d S d S )NF�utf-8��echo�encoding)�
isinstance�
basestring�pexpect�spawn�childr �setecho�
waitnoecho�prompt�
set_prompt�format�continuation_prompt�_expect_prompt�run_command)�self�cmd_or_spawn�orig_prompt�
prompt_change�
new_promptr �extra_init_cmds �2/usr/lib/python3/dist-packages/pexpect/replwrap.py�__init__zREPLWrapper.__init__! s� � � �l�J�/�/� &� ��|�%�'�R�R�R�D�J�J�%�D�J��:�?� $�
�J���u�%�%�%��J�!�!�#�#�#�� �%�D�K�K��O�O�K�%�,�,�Z�9L�M�M�
O�
O�
O�$�D�K�#6�� ��������%����^�,�,�,�,�,� &�%� c �n � | j � |� � | j � |� � d S )N)r �expect�sendline)r r r s r r zREPLWrapper.set_prompt<