Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
§

hµµhgãó`—dZddlmZddlmZmZddlmZmZddl	Z	dgZ
Gd„de¦«ZdS)	aThis is like :mod:`pexpect`, but it will work with any file descriptor that you
pass it. You are responsible for opening and close the file descriptor.
This allows you to use Pexpect with sockets and named pipes (FIFOs).

.. note::
    socket.fileno() does not give a readable file descriptor on windows.
    Use :mod:`pexpect.socket_pexpect` for cross-platform socket support

PEXPECT LICENSE

    This license is approved by the OSI and FSF as GPL-compatible.
        http://opensource.org/licenses/isc-license.txt

    Copyright (c) 2012, Noah Spurrier <noah@noah.org>
    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

é)Ú	SpawnBase)ÚExceptionPexpectÚTIMEOUT)Úselect_ignore_interruptsÚpoll_ignore_interruptséNÚfdspawncó\‡—eZdZdZ		dd„Zd„Zd	„Zdd
„Zd„Zd„Z	d
„Z
d„Zdˆfd„	ZˆxZ
S)r	zÎThis is like pexpect.spawn but allows you to supply your own open file
    descriptor. For example, you could use it to read through a file looking
    for patterns, or to control a modem or serial device. NééÐÚstrictFc
	óð—t|¦«td¦«kr$t|d¦«r| ¦«}t|¦«td¦«krtd¦«‚	t	j|¦«n#t$rtd¦«‚wxYwd|_d|_tj
|||||||¬¦«||_d|_d|_
d|z|_|	|_dS)	z§This takes a file descriptor (an int) or an object that support the
        fileno() method (returning an int). All Python file-like objects
        support fileno(). rÚfilenozdThe fd argument is not an int. If this is a command string then maybe you want to use pexpect.spawn.z/The fd argument is not a valid file descriptor.N)ÚencodingÚcodec_errorsFz<file descriptor %d>)ÚtypeÚhasattrrrÚosÚfstatÚOSErrorÚargsÚcommandrÚ__init__Úchild_fdÚown_fdÚclosedÚnameÚuse_poll)
ÚselfÚfdrÚtimeoutÚmaxreadÚsearchwindowsizeÚlogfilerrrs
          ú</usr/local/lib/python3.11/site-packages/pexpect/fdpexpect.pyrzfdspawn.__init__(s€õ‰8Œ8•t˜A‘w”wÒÐ¥7¨2¨xÑ#8Ô#8ÐØ—’‘”ˆB吉8Œ8•t˜A‘w”wÒÐÝ"ð$JñKôKð
Kð	VÝŒHR‰LŒLˆLˆLøÝð	Vð	Vð	VÝ"Ð#TÑUÔUÐUð	VøøøðˆŒ	؈ŒÝÔ˜4 ¨'Ð3CÀWØ$,¸<ð	Iñ	Iô	Ið	IàˆŒ
؈ŒØˆŒØ*¨RÑ/ˆŒ	Ø ˆŒ
ˆ
ˆ
sÁ5B
Â
B$có–—|jdkrdS| ¦«tj|j¦«d|_d|_dS)z¶Close the file descriptor.

        Calling this method a second time does nothing, but if the file
        descriptor was closed elsewhere, :class:`OSError` will be raised.
        éÿÿÿÿNT)rÚflushrÚcloser©rs r%r)z
fdspawn.closeCsG€ðŒ=˜BÒÐØˆFà
Š
‰ŒˆÝ
Œ”ÑÔÐØˆŒ
؈Œˆˆócód—|jdkrdS	tj|j¦«dS#YdSxYw)z‡This checks if the file descriptor is still valid. If :func:`os.fstat`
        does not raise an exception then we assume it is alive. r'FT)rrrr*s r%Úisalivezfdspawn.isaliveQsB€ðŒ=˜BÒÐØ5ð	ÝŒHT”]Ñ#Ô#Ð#ؐ4øð	ؐ55øøøs*ª/có —td¦«‚)z1Deprecated and invalid. Just raises an exception.z.This method is not valid for file descriptors.)r)rÚforces  r%Ú	terminatezfdspawn.terminate]s€åÐOÑPÔPÐPr+cóė| |¦«}| |d¦«|j |d¬¦«}t	j|j|¦«S)z+Write to fd, return number of bytes writtenÚsendF)Úfinal)Ú_coerce_send_stringÚ_logÚ_encoderÚencoderÚwriter)rÚsÚbs   r%r2zfdspawn.senddsW€à×$Ò$ QÑ'Ô'ˆØ	Š	!VÑÔÐàŒM× Ò  ¨%Ð Ñ0Ô0ˆÝŒx˜œ
 qÑ)Ô)Ð)r+cóf—| |¦«}| ||jz¦«S)zAWrite to fd with trailing newline, return number of bytes written)r4r2Úlinesep©rr9s  r%Úsendlinezfdspawn.sendlinels.€à×$Ò$ QÑ'Ô'ˆØyŠy˜˜Tœ\Ñ)Ñ*Ô*Ð*r+có0—| |¦«dS)zWrite to fd, return NoneN)r2r=s  r%r8z
fdspawn.writeqs€à	Š	!‰Œˆˆˆr+có:—|D]}| |¦«ŒdS)z+Call self.write() for each item in sequenceN)r8)rÚsequencer9s   r%Ú
writelineszfdspawn.writelinesus,€àð	ð	ˆAØJŠJq‰MŒMˆMˆMð	ð	r+rr'có2•—tjdkr_|dkr|j}|jg}g}g}|jrt||¦«}nt
||||¦«\}}}|j|vrtd¦«‚tt|¦« 
|¦«S)a¢
        Read from the file descriptor and return the result as a string.

        The read_nonblocking method of :class:`SpawnBase` assumes that a call
        to os.read will not block (timeout parameter is ignored). This is not
        the case for POSIX file-like objects such as sockets and serial ports.

        Use :func:`select.select`, timeout is implemented conditionally for
        POSIX systems.

        :param int size: Read at most *size* bytes.
        :param int timeout: Wait timeout seconds for file descriptor to be
            ready to read. When -1 (default), use self.timeout. When 0, poll.
        :return: String containing the bytes read
        Úposixr'zTimeout exceeded.)rrr!rrrrrÚsuperr	Úread_nonblocking)rÚsizer!ÚrlistÚwlistÚxlistÚ	__class__s      €r%rFzfdspawn.read_nonblockingzs«ø€õ Œ7gÒÐØ˜"Š}ˆ}Øœ,Ø”]OˆE؈E؈EØŒ}ð
Ý.¨u°gÑ>Ô>å&>ؘ5 %¨ñ'ô'Ñ#u˜eðŒ} EÐ)Ð)ÝÐ1Ñ2Ô2Ð2Ý•W˜dÑ#Ô#×4Ò4°TÑ:Ô:Ð:r+)NrrNNNr
F)F)rr')Ú__name__Ú
__module__Ú__qualname__Ú__doc__rr)r-r0r2r>r8rBrFÚ
__classcell__)rKs@r%r	r	#s×ø€€€€€ð>ð>ðSWØOTð!ð!ð!ð!ð6ððð
ð
ð
ðQðQðQðQð*ð*ð*ð+ð+ð+ð
ðððððð
;ð;ð;ð;ð;ð;ð;ð;ð;ð;r+)rOÚ	spawnbaserÚ
exceptionsrrÚutilsrrrÚ__all__r	©r+r%ú<module>rVs¡ðððð6!Ð Ð Ð Ð Ð Ø1Ð1Ð1Ð1Ð1Ð1Ð1Ð1ØCÐCÐCÐCÐCÐCÐCÐCØ	€	€	€	àˆ+€ðu;ðu;ðu;ðu;ðu;ˆiñu;ôu;ðu;ðu;ðu;r+