KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/pty.pyo
mς
‚=5Dc@s­dZdklZdkZdkZdddgZdZdZdZdZd	„Z	d
„Z
d„Zd„Zd
„Z
d„Zd„Zeed„Zeed„ZdS(sPseudo terminal utilities.(sselectNtopenptytforktspawniiicCsOytiƒSWnttfj
onXtƒ\}}t|ƒ}||fS(sdopenpty() -> (master_fd, slave_fd)
    Open a pty master/slave pair, using os.openpty() if possible.N(	tosRtAttributeErrortOSErrort_open_terminalt	master_fdt
slave_namet
slave_opentslave_fd(RRR
((t/usr/lib64/python2.4/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.N(
RRRR
RRtttynameRtcloseR(RRR
((Rtmaster_open!s

cCsϊy
dk}Wntj
onRXy"|itiddƒ\}}Wn!tj
o}ti	|‚nX||fSxtdD]l}xcdD][}d||}yti
|tiƒ}Wnti	j
o
q‡nX|d||fSq‡WqzWti	d‚dS(	slOpen pty master and return (master_fd, tty_name).
    SGI and generic BSD version, for when openpty() fails.NiΆitpqrstuvwxyzPQRSTt0123456789abcdefs/dev/ptys/dev/ttysout of pty devices(tsgitImportErrort_getptyRtO_RDWRttty_nameRtIOErrortmsgterrortxtytpty_nametopentfd(RRRRRRRR((RR1s*
"
cCs„ti|tiƒ}ydkl}l}Wntj
o|SnXy$|||dƒ|||dƒWnt	j
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.(sioctlsI_PUSHtptemtldtermN(
RRRRtresulttfcntltioctltI_PUSHRR(RR"R R#((RR	Hs	cCsytiƒ\}}Wnttfj
onAX|tjo(ytiƒWqgtj
oqgXn||fStƒ\}}tiƒ}|tjoitiƒti|ƒti
|tƒti
|tƒti
|tƒ|tjoti|ƒqn||fS(sdfork() -> (pid, master_fd)
    Fork and make the child a session leader with a controlling terminal.N(RtforkptytpidRRRtCHILDtsetsidRRR
RR
tdup2tSTDIN_FILENOt
STDOUT_FILENOt
STDERR_FILENO(R%RRR
((RRZs,
	




cCs5x.|djo ti||ƒ}||}qWdS(s#Write all the data to a descriptor.tN(tdataRtwriteRtn(RR-R/((Rt_writen|s

cCsti|dƒS(sDefault read function.iN(RtreadR(R((Rt_read‚scCs„x}t|tgggƒ\}}}||jo ||ƒ}ti	t
|ƒnt|jo|tƒ}t||ƒqqWdS(sParent copy loop.
    Copies
            pty master -> standard output   (master_read)
            standard input -> pty master    (stdin_read)iN(
tselectRR)trfdstwfdstxfdstmaster_readR-RR.R*t
stdin_readR0(RR7R8R4R5R-R6((Rt_copy†s!

cCst|ƒtdƒjo
|f}ntƒ\}}|tjoti|d|Œny&ti	t
ƒ}tit
ƒd}Wntij
o
d}nXyt|||ƒWn:ttfj
o(|otit
ti|ƒqπnXti|ƒdS(sCreate a spawned process.R,iiN(ttypetargvRR%RR&Rtexeclptttyt	tcgetattrR)tmodetsetrawtrestoreRR9R7R8RRt	tcsetattrt	TCSAFLUSHR
(R;R7R8RAR%R?R((RR•s$



(t__doc__R3RR=t__all__R)R*R+R&RRRR	RR0R2R9R(RRR=RR*RERR2RR+R9R3R	R&RR0R)((Rt?s"
							"		

Anon7 - 2021