__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��e�����SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJr SSK	r	SSK
Jr SSKJ
r
JrJr SSKJr SSKJrJrJrJr \S5r\R0SS	:�r"S
S\5rSrg)
�N)�contextmanager)�use_native_pty_fork�)�ExceptionPexpect�EOF�TIMEOUT)�	SpawnBase)�which�split_command_line�select_ignore_interrupts�poll_ignore_interruptsc#�r# �Sv� g![Ran[UR6eSnAff=f7f)z;Turn ptyprocess errors into our own ExceptionPexpect errorsN)�
ptyprocess�PtyProcessErrorr�args)�es �3/usr/lib/python3/dist-packages/pexpect/pty_spawn.py�_wrap_ptyprocess_errrs1���(�
���%�%�(�����'�'��(�s�7�	�7�4�/�4�7�c�l^�\rSrSrSr\r/SSSSSSSSSSSSS4U4S	jjrS
r/SS4SjrSr	S)S
jr
SrS*SjrSr
SrS+U4SjjrSrSrSrS,SjrSrSrSrSr\S5r\R4S5rSrS-SjrSrS rS!rS"r S#r!\""S5SS4S$jr#S%r$S&r%S.S'jr&S(r'U=r($)/�spawn�zfThis is the main class interface for Pexpect. Use this class to start
and control child applications. �i�NFT�strictc	�>�[[U]X4UXlU
S9 [RUl[R
Ul[RUlSUlXplX�l	X�l
X�l[RR5RS5UlUcSUlSUlSUlOUR)XX�5 X�lg)aXThis is the constructor. The command parameter may be a string that
includes a command and any arguments to the command. For example::

    child = pexpect.spawn('/usr/bin/ftp')
    child = pexpect.spawn('/usr/bin/ssh [email protected]')
    child = pexpect.spawn('ls -latr /tmp')

You may also construct it with a list of arguments like so::

    child = pexpect.spawn('/usr/bin/ftp', [])
    child = pexpect.spawn('/usr/bin/ssh', ['[email protected]'])
    child = pexpect.spawn('ls', ['-latr', '/tmp'])

After this the child application will be created and will be ready to
talk to. For normal use, see expect() and send() and sendline().

Remember that Pexpect does NOT interpret shell meta characters such as
redirect, pipe, or wild cards (``>``, ``|``, or ``*``). This is a
common mistake.  If you want to run a command and pipe it through
another command then you must also start a shell. For example::

    child = pexpect.spawn('/bin/bash -c "ls -l | grep LOG > logs.txt"')
    child.expect(pexpect.EOF)

The second form of spawn (where you pass a list of arguments) is useful
in situations where you wish to spawn a command and pass it its own
argument list. This can make syntax more clear. For example, the
following is equivalent to the previous example::

    shell_cmd = 'ls -l | grep LOG > logs.txt'
    child = pexpect.spawn('/bin/bash', ['-c', shell_cmd])
    child.expect(pexpect.EOF)

The maxread attribute sets the read buffer size. This is maximum number
of bytes that Pexpect will try to read from a TTY at one time. Setting
the maxread size to 1 will turn off buffering. Setting the maxread
value higher may help performance in cases where large amounts of
output are read back from the child. This feature is useful in
conjunction with searchwindowsize.

When the keyword argument *searchwindowsize* is None (default), the
full buffer is searched at each iteration of receiving incoming data.
The default number of bytes scanned at each iteration is very large
and may be reduced to collaterally reduce search cost.  After
:meth:`~.expect` returns, the full buffer attribute remains up to
size *maxread* irrespective of *searchwindowsize* value.

When the keyword argument ``timeout`` is specified as a number,
(default: *30*), then :class:`TIMEOUT` will be raised after the value
specified has elapsed, in seconds, for any of the :meth:`~.expect`
family of method calls.  When None, TIMEOUT will not be raised, and
:meth:`~.expect` may block indefinitely until match.


The logfile member turns on or off logging. All input and output will
be copied to the given file object. Set logfile to None to stop
logging. This is the default. Set logfile to sys.stdout to echo
everything to standard output. The logfile is flushed after each write.

Example log input and output to a file::

    child = pexpect.spawn('some_command')
    fout = open('mylog.txt','wb')
    child.logfile = fout

Example log to stdout::

    # In Python 2:
    child = pexpect.spawn('some_command')
    child.logfile = sys.stdout

    # In Python 3, we'll use the ``encoding`` argument to decode data
    # from the subprocess and handle it as unicode:
    child = pexpect.spawn('some_command', encoding='utf-8')
    child.logfile = sys.stdout

The logfile_read and logfile_send members can be used to separately log
the input from the child and output sent to the child. Sometimes you
don't want to see everything you write to the child. You only want to
log what the child sends back. For example::

    child = pexpect.spawn('some_command')
    child.logfile_read = sys.stdout

You will need to pass an encoding to spawn in the above code if you are
using Python 3.

To separately log output sent to the child use logfile_send::

    child.logfile_send = fout

If ``ignore_sighup`` is True, the child process will ignore SIGHUP
signals. The default is False from Pexpect 4.0, meaning that SIGHUP
will be handled normally by the child.

The delaybeforesend helps overcome a weird behavior that many users
were experiencing. The typical problem was that a user would expect() a
"Password:" prompt and then immediately call sendline() to send the
password. The user would then see that their password was echoed back
to them. Passwords don't normally echo. The problem is caused by the
fact that most applications print out the "Password" prompt and then
turn off stdin echo, but if you send your password before the
application turned off echo, then you get your password echoed.
Normally this wouldn't be a problem when interacting with a human at a
real keyboard. If you introduce a slight delay just before writing then
this seems to clear up the problem. This was such a common problem for
many users that I decided that the default pexpect behavior should be
to sleep just before writing to the child application. 1/20th of a
second (50 ms) seems to be enough to clear up the problem. You can set
delaybeforesend to None to return to the old behavior.

Note that spawn is clever about finding commands on your path.
It uses the same logic that "which" uses to find executables.

If you wish to get the exit status of the child you must call the
close() method. The exit or signal status of the child will be stored
in self.exitstatus or self.signalstatus. If the child exited normally
then exitstatus will store the exit return code and signalstatus will
be None. If the child was terminated abnormally with a signal then
signalstatus will store the signal value and exitstatus will be None::

    child = pexpect.spawn('some_command')
    child.close()
    print(child.exitstatus, child.signalstatus)

If you need more detail you can also read the self.status member which
stores the status returned by os.waitpid. You can interpret this using
os.WIFEXITED/os.WEXITSTATUS or os.WIFSIGNALED/os.TERMSIG.

The echo attribute may be set to False to disable echoing of input.
As a pseudo-terminal, all input echoed by the "keyboard" (send()
or sendline()) will be repeated to output.  For many cases, it is
not desirable to have echo enabled, and it may be later disabled
using setecho(False) followed by waitnoecho().  However, for some
platforms such as Solaris, this is not possible, and should be
disabled immediately on spawn.

If preexec_fn is given, it will be called in the child process before
launching the given command. This is useful to e.g. reset inherited
signal handlers.

The dimensions attribute specifies the size of the pseudo-terminal as
seen by the subprocess, and is specified as a two-entry tuple (rows,
columns). If this is unspecified, the defaults in ptyprocess will apply.

The use_poll attribute enables using select.poll() over select.select()
for socket handling. This is handy if your system could have > 1024 fds
)�timeout�maxread�searchwindowsize�logfile�encoding�codec_errors�d�irixNz<pexpect factory incomplete>)�superr�__init__�pty�STDIN_FILENO�
STDOUT_FILENO�
STDERR_FILENO�str_last_chars�cwd�env�echo�
ignore_sighup�sys�platform�lower�
startswith�_spawn__irix_hack�commandr�name�_spawn�use_poll)�selfr4rrrrrr+r,r.r-�
preexec_fnr r!�
dimensionsr7�	__class__s                �rr%�spawn.__init__$s����r	�e�T�#�G�Wg�,3�Ua�	$�	c��,�,��� �.�.��� �.�.���!��������	�*���<�<�-�-�/�:�:�6�B����?��D�L��D�I�6�D�I��K�K��z�>� �
�c���/nUR[U55 URS[UR5-5 URSUR<35 URSUR
<SURUR
*S<35 URSUR
<SUR(aURUR
*SOS<35 URSUR<35 URS	UR<35 URS
[UR5-5 URS[UR5-5 [US5(a'URS
[UR5-5 URS[UR5-5 URS[UR5-5 URS[UR 5-5 URS[UR"5-5 URS[UR$5-5 URS[UR&5-5 URS[UR(5-5 URS[UR*5-5 URS[UR,5-5 URS[UR.5-5 URS[UR05-5 URS[UR25-5 URS[UR45-5 URS[UR65-5 SR9U5$)zNThis returns a human-readable string that represents the state of
the object. z	command: zargs: z
buffer (last z	 chars): Nz
before (last �zafter: zmatch: z
match_index: zexitstatus: �ptyprocz
flag_eof: zpid: z
child_fd: zclosed: z	timeout: zdelimiter: z	logfile: zlogfile_read: zlogfile_send: z	maxread: zignorecase: zsearchwindowsize: zdelaybeforesend: zdelayafterclose: zdelayafterterminate: �
)�append�repr�strr4rr*�buffer�before�after�match�match_index�
exitstatus�hasattr�flag_eof�pid�child_fd�closedr�	delimiterr�logfile_read�logfile_sendr�
ignorecaser�delaybeforesend�delayafterclose�delayafterterminate�join�r8�ss  r�__str__�
spawn.__str__�s���
��	����d���	����s�4�<�<�0�0�1�	���t�y�y�*�+�	����1D�1D�T�[�[�RV�Re�Re�Qe�Qf�Eg�h�i�	����1D�1D�ko�kv�kv�T�[�[�RV�Re�Re�Qe�Qf�Eg�|~�E~��	A�	����
�
�,�-�	����
�
�,�-�	����3�t�'7�'7�#8�8�9�	����#�d�o�o�"6�6�7��4��#�#�
�H�H�\�C��
�
�$6�6�7�	����3�t�x�x�=�(�)�	�����D�M�M� 2�2�3�	����c�$�+�+�.�.�/�	����s�4�<�<�0�0�1�	�����T�^�^�!4�4�5�	����s�4�<�<�0�0�1�	���!�C��(9�(9�$:�:�;�	���!�C��(9�(9�$:�:�;�	����s�4�<�<�0�0�1�	����#�d�o�o�"6�6�7�	���%��D�,A�,A�(B�B�C�	���$�s�4�+?�+?�'@�@�A�	���$�s�4�+?�+?�'@�@�A�	���(�3�t�/G�/G�+H�H�I��y�y��|�r=c�^�[U[S55(a[S5e[U[/55(d[S5eU/:Xa%[	U5UlUR
SUlO,USSUlUR
RSU5 Xl[URURS9nUc[SSUR--5eXPlURUR
S'SS	RUR
5-S
-UlURbS5eURcS5eURTS
.nUR(a
U4SjnXvS'UbXFS'URbRUR
Vs/sH5n[U[ 5(aUOUR#UR5PM7 snUlUR$"UR
4URUR&S.UD6UlUR(RUlUR(R*UlSUlSUlgs snf)z�This starts the given command in a child process. This does all the
fork/exec type of stuff for a pty. This is called by __init__. If args
is empty then command will be parsed (split on spaces) and args will be
set to parsed arguments. rz�Command is an int type. If this is a file descriptor then maybe you want to use fdpexpect.fdspawn which takes an existing file descriptor instead of a command string.z#The argument, args, must be a list.N)r,z%The command was not found or was not zexecutable: %s.�<� �>zThe pid member must be None.z$The command member must not be None.)r-r9c�>�[R"[R[R5 TbT"5 gg)z7Set SIGHUP to be ignored, then call the real preexec_fnN)�signal�SIGHUP�SIG_IGN)r9s�r�preexec_wrapper�%spawn._spawn.<locals>.preexec_wrapper s)����
�
�f�m�m�V�^�^�<��)��L�*r=r9r:)r,r+F)�
isinstance�typer�	TypeErrorrrr4�insertr
r,rWr5rMr-r.r �bytes�encode�	_spawnptyr+r@�fdrN�
terminatedrO)	r8r4rr9r:�command_with_path�kwargsrd�as	   `     rr6�spawn._spawn�s��� �g�t�A�w�'�'�"�$C�D�
D�
�$��R��)�)��A�B�B��2�:�*�7�3�D�I��9�9�Q�<�D�L��Q��D�I��I�I���Q��(�"�L�!�$�,�,�D�H�H�=���$�"�#J�%����4�$5�6�
6�(���|�|��	�	�!���#�(�(�4�9�9�-�-��3��	��x�x��?�!?�?���|�|�'�O�)O�O�'��)�)�:�>�����
!�
$3�<� ��!�#-�<� ��=�=�$�#'�)�)�-�"+�Q�)��E�2�2��������8O�O�"+�-�D�I��~�~�d�i�i�=�T�X�X�)-���=�5;�=����<�<�#�#���������
� �������-s�<Ic�D�[RR"U40UD6$)z1Spawn a pty and return an instance of PtyProcess.)r�
PtyProcessr)r8rrps   rrl�spawn._spawnpty9s���$�$�*�*�4�:�6�:�:r=c���UR5 [5 URRUS9 SSS5 UR	5 SUlSUlg!,(df   N-=f)aThis closes the connection with the child application. Note that
calling close() more than once is valid. This emulates standard Python
behavior with files. Set force to True if you want to make sure that
the child is terminated (SIGKILL is sent if the child ignores SIGHUP
and SIGINT). )�forceN���T)�flushrr@�close�isaliverNrO�r8rws  rrz�spawn.close=sQ��	
�
�
��
!�
#�
�L�L���U��+�$�	
������
����
$�
#�s�A�
A*c�B�[R"UR5$)a6This returns True if the file descriptor is open and connected to a
tty(-like) device, else False.

On SVR4-style platforms implementing streams, such as SunOS and HP-UX,
the child pty may not appear as a terminal device.  This means
methods such as setecho(), setwinsize(), getwinsize() may raise an
IOError. )�os�isattyrN�r8s rr��spawn.isattyMs���y�y����'�'r=c��US:XaURnUb[R"5U-nUR5(dgUS:aUbgUbW[R"5-
n[R"S5 MS)a�This waits until the terminal ECHO flag is set False. This returns
True if the echo mode is off. This returns False if the ECHO flag was
not set False before the timeout. This can be used to detect when the
child is waiting for a password. Usually a child application will turn
off echo mode when it is waiting for the user to enter a password. For
example, instead of expecting the "password:" prompt you can wait for
the child to set ECHO off::

    p = pexpect.spawn('ssh [email protected]')
    p.waitnoecho()
    p.sendline(mypassword)

If timeout==-1 then this method will use the value in self.timeout.
If timeout==None then this method to block until ECHO flag is False.
rxTrFg�������?)r�time�getecho�sleep)r8r�end_times   r�
waitnoecho�spawn.waitnoechoXsp��"�b�=��l�l�G����y�y�{�W�,�H���<�<�>�>����{�w�2���"�"�T�Y�Y�[�0���J�J�s�O�r=c�6�URR5$)aThis returns the terminal echo mode. This returns True if echo is
on or False if echo is off. Child applications that are expecting you
to enter a password often set ECHO False. See waitnoecho().

Not supported on platforms where ``isatty()`` returns False.  )r@r�r�s rr��
spawn.getechovs���|�|�#�#�%�%r=c�8�URRU5$)a�This sets the terminal echo mode on or off. Note that anything the
child sent before the echo will be lost, so you should be sure that
your input buffer is empty before you call setecho(). For example, the
following will work as expected::

    p = pexpect.spawn('cat') # Echo is on by default.
    p.sendline('1234') # We expect see this twice from the child...
    p.expect(['1234']) # ... once from the tty echo...
    p.expect(['1234']) # ... and again from cat itself.
    p.setecho(False) # Turn off tty echo
    p.sendline('abcd') # We will set this only once (echoed by cat).
    p.sendline('wxyz') # We will set this only once (echoed by cat)
    p.expect(['abcd'])
    p.expect(['wxyz'])

The following WILL NOT WORK because the lines sent before the setecho
will be lost::

    p = pexpect.spawn('cat')
    p.sendline('1234')
    p.setecho(False) # Turn off tty echo
    p.sendline('abcd') # We will set this only once (echoed by cat).
    p.sendline('wxyz') # We will set this only once (echoed by cat)
    p.expect(['1234'])
    p.expect(['1234'])
    p.expect(['abcd'])
    p.expect(['wxyz'])


Not supported on platforms where ``isatty()`` returns False.
)r@�setecho)r8�states  rr��
spawn.setecho~s��@�|�|�#�#�E�*�*r=c�>^�TR(a[S5eTR(aU4SjnOU4SjnU"S5(as[[T]U5n[U5U:aNU"S5(aAU[[T]U[U5-
5-
n[U5U:aU"S5(aMAU$US:XaTRnTR5(d2U"S5(a[[T]U5$STl
[
S5eTR(aUbUS:aSnUS:wa U"U5(a[[T]U5$TR5(dSTl
[
S	5e[S
5e![a TR5 ef=f![a TR5 Us$f=f)a�This reads at most size characters from the child application. It
includes a timeout. If the read does not complete within the timeout
period then a TIMEOUT exception is raised. If the end of file is read
then an EOF exception will be raised.  If a logfile is specified, a
copy is written to that log.

If timeout is None then the read may block indefinitely.
If timeout is -1 then the self.timeout value is used. If timeout is 0
then the child is polled and if there is no data immediately ready
then this will raise a TIMEOUT exception.

The timeout refers only to the amount of time to read at least one
character. This is not affected by the 'size' parameter, so if you call
read_nonblocking(size=100, timeout=30) and only one character is
available right away then one character will be returned immediately.
It will not wait for 30 seconds for another 99 characters to come in.

On the other hand, if there are bytes available to read immediately,
all those bytes will be read (up to the buffer size). So, if the
buffer size is 1 megabyte and there is 1 megabyte of data available
to read, the buffer will be filled, regardless of timeout.

This is a wrapper around os.read(). It uses select.select() or
select.poll() to implement the timeout. zI/O operation on closed file.c�2>�[TR/U5$�N)r
rN�rr8s �r�select�&spawn.read_nonblocking.<locals>.select�s���-�t�}�}�o�w�G�Gr=c�<>�[TR///U5S$)Nr)rrNr�s �rr�r��s ���/������R��Q�RS�T�Tr=rrxTz&End Of File (EOF). Braindead platform.�z&End of File (EOF). Very slow platform.zTimeout exceeded.)
rO�
ValueErrorr7r$r�read_nonblockingrr{�lenrrLr3r)r8�sizerr��incomingr;s`    �rr��spawn.read_nonblocking�s����4�;�;��<�=�=��=�=�
H�
U��!�9�9�
� ���>�t�D��
�h�-�$�&�6�!�9�9�$���e�T� C�D�3�x�=�DX� Y�Y�H��h�-�$�&�6�!�9�9��O��b�=��l�l�G��|�|�~�~��a�y�y��U�D�:�4�@�@� �D�M��>�?�?�
�
�
�
�"�w��{���

�q�L�f�W�o�o����6�t�<�<��|�|�~�~�!�D�M��>�?�?��-�.�.��c�
������
���$��L�L�N�#�O�	$�s�F
�;"F)�
F&�)G�Gc�&�URU5 g)zHThis is similar to send() except that there is no return value.
        N)�sendrXs  r�write�spawn.writes��	
�	�	�!�r=c�8�UHnURU5 M g)z�This calls write() for each element in the sequence. The sequence
can be any iterable object producing strings, typically a list of
strings. This does not add line separators. There is no return value.
N)r�)r8�sequencerYs   r�
writelines�spawn.writeliness���A��J�J�q�M�r=c��URb [R"UR5 URU5nUR	US5 UR
R
USS9n[R"URU5$)a1Sends string ``s`` to the child process, returning the number of
bytes written. If a logfile is specified, a copy is written to that
log.

The default terminal input mode is canonical processing unless set
otherwise by the child process. This allows backspace and other line
processing to be performed prior to transmitting to the receiving
program. As this is buffered, there is a limited size of such buffer.

On Linux systems, this is 4096 (defined by N_TTY_BUF_SIZE). All
other systems honor the POSIX.1 definition PC_MAX_CANON -- 1024
on OSX, 256 on OpenSolaris, and 1920 on FreeBSD.

This value may be discovered using fpathconf(3)::

    >>> from os import fpathconf
    >>> print(fpathconf(0, 'PC_MAX_CANON'))
    256

On such a system, only 256 bytes may be received per line. Any
subsequent bytes received will be discarded. BEL (``''``) is then
sent to output if IMAXBEL (termios.h) is set by the tty driver.
This is usually enabled by default.  Linux does not honor this as
an option -- it behaves as though it is always set on.

Canonical input processing may be disabled altogether by executing
a shell, then stty(1), before executing the final program::

    >>> bash = pexpect.spawn('/bin/bash', echo=False)
    >>> bash.sendline('stty -icanon')
    >>> bash.sendline('base64')
    >>> bash.sendline('x' * 5000)
r�F)�final)
rTr�r��_coerce_send_string�_log�_encoderrkrr�rN)r8rY�bs   rr��
spawn.sendso��F���+��J�J�t�+�+�,��$�$�Q�'���	�	�!�V���M�M� � ��%� �0���x�x��
�
�q�)�)r=c�^�URU5nURXR-5$)z�Wraps send(), sending string ``s`` to child process, with
``os.linesep`` automatically appended. Returns number of bytes
written.  Only a limited number of bytes may be sent for each
line in the default terminal mode, see docstring of :meth:`send`.
)r�r��lineseprXs  r�sendline�spawn.sendline;s*��
�$�$�Q�'���y�y��\�\�)�*�*r=c�z�URbURURS5nURUS5 g)z5Write control characters to the appropriate log filesN�replacer�)r �decoder�rXs  r�_log_control�spawn._log_controlDs.���=�=�$�������	�2�A��	�	�!�V�r=c�b�URRU5up#URU5 U$)z�Helper method that wraps send() with mnemonic access for sending control
character to the child (such as Ctrl-C or Ctrl-D).  For example, to send
Ctrl-G (ASCII 7, bell, '')::

    child.sendcontrol('g')

See also, sendintr() and sendeof().
)r@�sendcontrolr�)r8�char�n�bytes    rr��spawn.sendcontrolJs-���,�,�*�*�4�0������$���r=c�^�URR5upURU5 g)a�This sends an EOF to the child. This sends a character which causes
the pending parent output buffer to be sent to the waiting child
program without waiting for end-of-line. If it is the first character
of the line, the read() in the user program returns 0, which signifies
end-of-file. This means to work as expected a sendeof() has to be
called at the beginning of a line. This method does not send a newline.
It is the responsibility of the caller to ensure the eof is sent at the
beginning of a line. N)r@�sendeofr��r8r�r�s   rr��
spawn.sendeofWs&���,�,�&�&�(������$�r=c�^�URR5upURU5 g)zfThis sends a SIGINT to the child. It does not require
the SIGINT to be the first character on a line. N)r@�sendintrr�r�s   rr��spawn.sendintrds&���,�,�'�'�)������$�r=c�.�URR$r��r@rLr�s rrL�spawn.flag_eofks���|�|�$�$�$r=c�$�XRlgr�r�)r8�values  rrLr�os�� %���r=c��UR$)z@This returns True if the EOF exception was ever raised.
        )rLr�s r�eof�	spawn.eofss���}�}�r=c�x�UR5(dgUR[R5 [R
"UR5 UR5(dgUR[R5 [R
"UR5 UR5(dgUR[R5 [R
"UR5 UR5(dgU(aVUR[R5 [R
"UR5 UR5(dggg![a: [R
"UR5 UR5(dggf=f)z�This forces a child process to terminate. It starts nicely with
SIGHUP and SIGINT. If "force" is True then moves onto SIGKILL. This
returns True if the child was terminated. This returns False if the
child could not be terminated. TF)r{�killrarbr�r�rV�SIGCONT�SIGINT�SIGKILL�OSErrorr|s  r�	terminate�spawn.terminatexs���|�|�~�~��	��I�I�f�m�m�$��J�J�t�/�/�0��<�<�>�>���I�I�f�n�n�%��J�J�t�/�/�0��<�<�>�>���I�I�f�m�m�$��J�J�t�/�/�0��<�<�>�>����	�	�&�.�.�)��
�
�4�3�3�4��|�|�~�~�� ����		�

�J�J�t�/�/�0��<�<�>�>���		�s'�AE5�-AE5�AE5�AE5�5?F9�8F9c��URn[5 UR5nSSS5 URUlURUlUR
UlSUlW$!,(df   NJ=f)aThis waits until the child exits. This is a blocking call. This will
not read any data from the child, so this will block forever if the
child has unread output and has terminated. In other words, the child
may have printed output then called exit(), but, the child is
technically still alive until its output is read by the parent.

This method is non-blocking if :meth:`wait` has already been called
previously or :meth:`isalive` method returns False.  It simply returns
the previously determined exit status.
NT)r@r�wait�statusrJ�signalstatusrn)r8r@rJs   rr��
spawn.wait�sc���,�,��
!�
#�!����J�$��n�n���!�,�,���#�0�0��������$�
#�s�A,�,
A:c��URn[5 UR5nSSS5 W(d:URUlURUlUR
UlSUlU$!,(df   NQ=f)a:This tests if the child process is running or not. This is
non-blocking. If the child was terminated then this will read the
exitstatus or signalstatus of the child. This returns True if the child
process appears to be running or False if not. It can take literally
SECONDS for Solaris to return the right status. NT)r@rr{r�rJr�rn)r8r@�alives   rr{�
spawn.isalive�sd���,�,��
!�
#��O�O�%�E�$��!�.�.�D�K�%�0�0�D�O� '� 4� 4�D��"�D�O���$�
#�s�A3�3
Bc�r�UR5(a"[R"URU5 gg)z�This sends the given signal to the child application. In keeping
with UNIX tradition it has a misleading name. It does not necessarily
kill the child unless you send the right signal. N)r{rr�rM)r8�sigs  rr��
spawn.kill�s&���<�<�>�>��G�G�D�H�H�c�"�r=c�6�URR5$)zeThis returns the terminal window size of the child tty. The return
value is a tuple of (rows, cols). )r@�
getwinsizer�s rr��spawn.getwinsize�s���|�|�&�&�(�(r=c�8�URRX5$)aThis sets the terminal window size of the child tty. This will cause
a SIGWINCH signal to be sent to the child. This does not change the
physical window size. It changes the size reported to TTY-aware
applications like vi or curses -- applications that respond to the
SIGWINCH signal. )r@�
setwinsize)r8�rows�colss   rr��spawn.setwinsize�s���|�|�&�&�t�2�2r=c�F�URUR5 URR5 UR	5Ul[R"UR5n[R"UR5 Ub[(aURS5nURXU5 [R"UR[RU5 g![R"UR[RU5 f=f)a�This gives control of the child process to the interactive user (the
human at the keyboard). Keystrokes are sent to the child process, and
the stdout and stderr output of the child process is printed. This
simply echos the child stdout and child stderr to the real stdout and
it echos the real stdin to the child stdin. When the user types the
escape_character this method will return None. The escape_character
will not be transmitted.  The default for escape_character is
entered as ``Ctrl - ]``, the very same as BSD telnet. To prevent
escaping, escape_character may be set to None.

If a logfile is specified, then the data sent and received from the
child process in interact mode is duplicated to the given log.

You may pass in optional input and output filter functions. These
functions should take bytes array and return bytes array too. Even
with ``encoding='utf-8'`` support, meth:`interact` will always pass
input_filter and output_filter bytes. You may need to wrap your
function to decode and encode back to UTF-8.

The output_filter will be passed all the output from the child process.
The input_filter will be passed all the keyboard input from the user.
The input_filter is run BEFORE the check for the escape_character.

Note that if you change the window size of the parent the SIGWINCH
signal will not be passed through to the child. If you want the child
window size to change when the parent's window size changes then do
something like the following example::

    import pexpect, struct, fcntl, termios, signal, sys
    def sigwinch_passthrough (sig, data):
        s = struct.pack("HHHH", 0, 0, 0, 0)
        a = struct.unpack('hhhh', fcntl.ioctl(sys.stdout.fileno(),
            termios.TIOCGWINSZ , s))
        if not p.closed:
            p.setwinsize(a[0],a[1])

    # Note this 'p' is global and used in sigwinch_passthrough.
    p = pexpect.spawn('/bin/bash')
    signal.signal(signal.SIGWINCH, sigwinch_passthrough)
    p.interact()
Nzlatin-1)�write_to_stdoutrE�stdoutry�buffer_type�_buffer�tty�	tcgetattrr'�setraw�PY3rk�_spawn__interact_copy�	tcsetattr�	TCSAFLUSH)r8�escape_character�input_filter�
output_filter�modes     r�interact�spawn.interact�s���\	
���T�[�[�)��������'�'�)����}�}�T�.�.�/���
�
�4�$�$�%��'�C�C�/�6�6�y�A��	B�� � �!1��O��M�M�$�+�+�S�]�]�D�A��C�M�M�$�+�+�S�]�]�D�A�s�+C.�.2D c��US:waOUR5(a9[R"X5nX#SnUS:waUR5(aM7gggg)�/This is used by the interact() method.
        r=N)r{rr�)r8rm�datar�s    r�__interact_writen�spawn.__interact_writensE���c�k�d�l�l�n�n�����"�A���8�D��c�k�d�l�l�n�n�k�n�kr=c�0�[R"US5$)r�i�)r�read)r8rms  r�__interact_read�spawn.__interact_read%s���w�w�r�4� � r=c���UR5(Ga�UR(a"[URUR/5nO&[URUR///5upEnURU;aeUR
UR5nUS:XagU(aU"U5nURUS5 [R"URU5 URU;a�UR
UR5nU(aU"U5nSn	UbURU5n	U	S:wa;USU	nU(aURUS5 UR!URU5 gURUS5 UR!URU5 UR5(aGM�gg![a,nURS[R:XaSnAgeSnAff=f)r�rNr=r�rxr�)r{r7r
rNr'r�_spawn__interact_readr�r�errno�EIOr�rr�r(�rfind�_spawn__interact_writen)
r8r�r�r��r�wrr��err�is
          r�__interact_copy�spawn.__interact_copy+s����l�l�n�n��}�}�*�D�M�M�4�;L�;L�+M�N��2��]�]�D�$5�$5�6��B����a��}�}��!���/�/��
�
�>�D��3�;�� �(��.�D��	�	�$��'�����+�+�T�2�� � �A�%��+�+�D�,=�,=�>���'��-�D���#�/��
�
�#3�4�A���7����8�D���	�	�$��/��*�*�4�=�=�$�?���	�	�$��'��&�&�t�}�}�d�;�I�l�l�n�n�����x�x��{�e�i�i�/����	�s�F>�>
G4�!G/�.G/�/G4)r)r'r(�__irix_hackr�rrNrOr4r+r-r,rJrLr.r5rMr@r�r�r*rnr7)T)rx)rrx)r?)F)NNN))�__name__�
__module__�__qualname__�__firstlineno__�__doc__rr%rZr6rlrzr�r�r�r�r�r�r�r�r�r�r�r�r��propertyrL�setterr�r�r�r{r�r�r��chrr�rrr��__static_attributes__�
__classcell__)r;s@rrrs���(�.��%'��T�"&��$�D�$�4�D��X�$��	j!�X�@$&�$�4�G�R;�� 	(��<&� +�D^/�@��**�X+��� � ��%��%��_�_�&��&��
&�P�0�&#�)�
3�),�B���T�8B�t�!�GK�+<�+<r=rc�<�URSS5 [U0UD6$)z-Deprecated: pass encoding to spawn() instead.r zutf-8)�
setdefaultr)rrps  r�spawnurYs"��
���j�'�*��$�!�&�!�!r=)rr/r�r&r�rra�
contextlibrr�ptyprocess.ptyprocessr�
exceptionsrrr�	spawnbaser	�utilsr
rrr
r�version_infor�rr�r=r�<module>r"su��	�
��
�
��
�%��5�6�6� ����(��(������a���y<�I�y<�x"r=

Filemanager

Name Type Size Permission Actions
ANSI.cpython-313.pyc File 18.51 KB 0644
FSM.cpython-313.pyc File 14.93 KB 0644
__init__.cpython-313.pyc File 4.15 KB 0644
_async.cpython-313.pyc File 911 B 0644
_async_pre_await.cpython-313.pyc File 6.44 KB 0644
_async_w_await.cpython-313.pyc File 6.54 KB 0644
exceptions.cpython-313.pyc File 2.24 KB 0644
expect.cpython-313.pyc File 15.73 KB 0644
fdpexpect.cpython-313.pyc File 7.2 KB 0644
popen_spawn.cpython-313.pyc File 8.3 KB 0644
pty_spawn.cpython-313.pyc File 39.65 KB 0644
pxssh.cpython-313.pyc File 20.63 KB 0644
replwrap.cpython-313.pyc File 6.74 KB 0644
run.cpython-313.pyc File 6.83 KB 0644
screen.cpython-313.pyc File 19.42 KB 0644
socket_pexpect.cpython-313.pyc File 6.59 KB 0644
spawnbase.cpython-313.pyc File 22.52 KB 0644
utils.cpython-313.pyc File 5.9 KB 0644
Filemanager