b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/pty.pyo
Size4.8 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:29
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@s¶dZddklZddkZddkZdddgZdZdZd ZdZd
�Z d �Z
d �Z d
�Z d�Z
d�Zd�Zeed�Zeed�ZdS(sPseudo terminal utilities.iÿÿÿÿ(tselectNtopenptytforktspawniiicCsOyti�SWnttfj
onXt�\}}t|�}||fS(sdopenpty() -> (master_fd, slave_fd)
Open a pty master/slave pair, using os.openpty() if possible.(tosRtAttributeErrortOSErrort_open_terminalt
slave_open(t master_fdt
slave_nametslave_fd((s/usr/lib64/python2.6/pty.pyRs cCs_yti�\}}Wnttfj
on(Xti|�}ti|�||fSt�S(s�master_open() -> (master_fd, slave_name)
Open a pty master and return the fd, and the filename of the slave end.
Deprecated, use openpty() instead.(RRRRtttynametcloseR(R R R
((s/usr/lib64/python2.6/pty.pyt master_open!s

cCsúyddk}Wntj
onRXy"|itidd�\}}Wn!tj
o}ti|�nX||fSxqdD]i}x`dD]X}d||}yti|ti�}Wntij
o
q�nX|d||fSWq}Wtid �dS(
slOpen pty master and return (master_fd, tty_name).
SGI and generic BSD version, for when openpty() fails.iÿÿÿÿNi¶itpqrstuvwxyzPQRSTt0123456789abcdefs/dev/ptys/dev/ttysout of pty devices(tsgit ImportErrort_getptyRtO_RDWRtIOErrorterrortopen(Rttty_nameR tmsgtxtytpty_nametfd((s/usr/lib64/python2.6/pty.pyR1s("
c Cs�ti|ti�}yddkl}l}Wntj
o|SXy$|||d�|||d�Wntj
onX|S(s©slave_open(tty_name) -> slave_fd
Open the pty slave and acquire the controlling terminal, returning
opened filedescriptor.
Deprecated, use openpty() instead.iÿÿÿÿ(tioctltI_PUSHtptemtldterm(RRRtfcntlRRRR(RtresultRR((s/usr/lib64/python2.6/pty.pyRHsc CsDyti�\}}Wnttfj
onAX|tjo(yti�Wqgtj
oqgXn||fSt�\}}ti�}|tjo�ti�ti|�ti |t
�ti |t �ti |t �|t joti|�nti
tit �ti�}ti|�nti|�||fS(sdfork() -> (pid, master_fd)
Fork and make the child a session leader with a controlling terminal.(RtforkptyRRtCHILDtsetsidRRR
tdup2t STDIN_FILENOt
STDOUT_FILENOt
STDERR_FILENORR R(tpidRR R ttmp_fd((s/usr/lib64/python2.6/pty.pyRZs0
 
 




cCs5x.|djo ti||�}||}qWdS(s#Write all the data to a descriptor.tN(Rtwrite(Rtdatatn((s/usr/lib64/python2.6/pty.pyt_writen�s
cCsti|d�S(sDefault read function.i(Rtread(R((s/usr/lib64/python2.6/pty.pyt_read�scCs�x{t|tggg�\}}}||jo ||�}tit|�nt|jo|t�}t||�qqdS(s�Parent copy loop.
Copies
pty master -> standard output (master_read)
standard input -> pty master (stdin_read)N(RR(RR.R)R1(R t master_readt
stdin_readtrfdstwfdstxfdsR/((s/usr/lib64/python2.6/pty.pyt_copy�s
 
 c
Cst|�td�jo
|f}nt�\}}|tjoti|d|�ny&tit�}tit�d}Wnti j
o
d}nXyt
|||�Wn:t t fj
o(|oti
tti|�qðnXti|�dS(sCreate a spawned process.R-iiN(ttypeRR%Rtexeclptttyt tcgetattrR(tsetrawRR9RRt tcsetattrt TCSAFLUSHR
(targvR4R5R+R tmodetrestore((s/usr/lib64/python2.6/pty.pyR�s"



 (t__doc__RRR<t__all__R(R)R*R%RRRRRR1R3R9R(((s/usr/lib64/python2.6/pty.pyt<module>s"      (