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/21571/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21571/root/usr/lib64/python2.4/popen2.pyc
mò
‚=5Dc@sTdZdkZdkZdddgZyeidƒZWneefj
o
dZnXgZd„Z	dfd	„ƒYZ
d
e
fd„ƒYZeid d
jpeidjo7[
[ddd„Z
ddd„Zddd„ZnAddd„Z
ddd„Zddd„Zeidd
gƒd„ZedjoeƒndS(snSpawn a command with pipes to its stdin, stdout, and optionally stderr.

The normal os.popen(cmd, mode) call spawns a shell command and provides a
file interface to just the input or output of the process depending on
whether mode is 'r' or 'w'.  This module provides the functions popen2(cmd)
and popen3(cmd) which return two or three pipes to the spawned command.
Ntpopen2tpopen3tpopen4tSC_OPEN_MAXicCs xtD]}|iƒqWdS(N(t_activetinsttpoll(R((t/usr/lib64/python2.4/popen2.pyt_cleanupstPopen3cBs>tZdZdZedd„Zd„Zd„Zd„ZRS(swClass representing a child process.  Normally instances are created
    by the factory functions popen2() and popen3().iÿÿÿÿc
CsGtƒtiƒ\}}tiƒ\}	}|otiƒ\}}nti
ƒ|_|idjoLti
|dƒti
|dƒ|oti
|dƒn|i|ƒnti|ƒti|d|ƒ|_ti|ƒti|	d|ƒ|_|o)ti|ƒti|d|ƒ|_n
d|_ti|ƒdS(sdThe parameter 'cmd' is the shell command to execute in a
        sub-process.  On UNIX, 'cmd' may be a sequence, in which case arguments
        will be passed directly to the program without shell intervention (as
        with os.spawnv()).  If 'cmd' is a string it will be passed to the shell
        (as with os.system()).   The 'capturestderr' flag, if true, specifies
        that the object should capture standard error output of the child
        process.  The default is false.  If the 'bufsize' parameter is
        specified, it specifies the size of the I/O buffers to/from the child
        process.iiitwtrN(Rtostpipetp2creadtp2cwritetc2preadtc2pwritet
capturestderrterroutterrintforktselftpidtdup2t
_run_childtcmdtclosetfdopentbufsizettochildt	fromchildtchilderrtNoneRtappend(
RRRRRRRRRR((Rt__init__s,	


	cCs‘t|tƒodd|g}nx>tdtƒD]-}yti|ƒWq3tj
oq3Xq3Wzti	|d|ƒWdti
dƒXdS(Ns/bin/shs-ciii(t
isinstanceRt
basestringtrangetMAXFDtiRRtOSErrortexecvpt_exit(RRR(((RRAs	cCs€|idjoiyLti|itiƒ\}}||ijo||_ti|ƒnWqytij
oqyXn|iS(shReturn the exit status of the child process if it has finished,
        or -1 if it hasn't finished yet.iN(	RtstsRtwaitpidRtWNOHANGRtremoveterror(RRR,((RRNs		cCs`|idjoIti|idƒ\}}||ijo||_ti|ƒqYn|iS(s9Wait for and return the exit status of the child process.iN(RR,RR-RRR/(RRR,((Rtwait[s	(	t__name__t
__module__t__doc__R,tFalseR#RRR1(((RR	s"	
	
tPopen4cBstZdZdd„ZRS(NiÿÿÿÿcCsætƒtiƒ\}}tiƒ\}}tiƒ|_	|i	djoAti
|dƒti
|dƒti
|dƒ|i|ƒnti
|ƒti|d|ƒ|_ti
|ƒti|d|ƒ|_ti|ƒdS(NiiiR
R(RRR
RRRRRRRRRRRRRRRRR"(RRRRRRR((RR#hs

(R2R3R!R R#(((RR6esitwintos2emxiÿÿÿÿttcCs%ti|||ƒ\}}||fS(s¸Execute the shell command 'cmd' in a sub-process. On UNIX, 'cmd' may
        be a sequence, in which case arguments will be passed directly to the
        program without shell intervention (as with os.spawnv()). If 'cmd' is a
        string it will be passed to the shell (as with os.system()). If
        'bufsize' is specified, it sets the buffer size for the I/O pipes. The
        file objects (child_stdout, child_stdin) are returned.N(RRRtmodeRR
R(RRR:RR
((RR~scCs+ti|||ƒ\}}}|||fS(sÆExecute the shell command 'cmd' in a sub-process. On UNIX, 'cmd' may
        be a sequence, in which case arguments will be passed directly to the
        program without shell intervention (as with os.spawnv()). If 'cmd' is a
        string it will be passed to the shell (as with os.system()). If
        'bufsize' is specified, it sets the buffer size for the I/O pipes. The
        file objects (child_stdout, child_stdin, child_stderr) are returned.N(RRRR:RR
Rte(RRR:R;RR
((RRˆscCs%ti|||ƒ\}}||fS(s¿Execute the shell command 'cmd' in a sub-process. On UNIX, 'cmd' may
        be a sequence, in which case arguments will be passed directly to the
        program without shell intervention (as with os.spawnv()). If 'cmd' is a
        string it will be passed to the shell (as with os.system()). If
        'bufsize' is specified, it sets the buffer size for the I/O pipes. The
        file objects (child_stdout_stderr, child_stdin) are returned.N(RRRR:RR
R(RRR:RR
((RR’scCs"t|t|ƒ}|i|ifS(s¸Execute the shell command 'cmd' in a sub-process. On UNIX, 'cmd' may
        be a sequence, in which case arguments will be passed directly to the
        program without shell intervention (as with os.spawnv()). If 'cmd' is a
        string it will be passed to the shell (as with os.system()). If
        'bufsize' is specified, it sets the buffer size for the I/O pipes. The
        file objects (child_stdout, child_stdin) are returned.N(R	RR5RRRR(RRR:R((RRœscCs(t|t|ƒ}|i|i|ifS(sÆExecute the shell command 'cmd' in a sub-process. On UNIX, 'cmd' may
        be a sequence, in which case arguments will be passed directly to the
        program without shell intervention (as with os.spawnv()). If 'cmd' is a
        string it will be passed to the shell (as with os.system()). If
        'bufsize' is specified, it sets the buffer size for the I/O pipes. The
        file objects (child_stdout, child_stdin, child_stderr) are returned.N(R	RtTrueRRRRR (RRR:R((RR¦scCst||ƒ}|i|ifS(s¿Execute the shell command 'cmd' in a sub-process. On UNIX, 'cmd' may
        be a sequence, in which case arguments will be passed directly to the
        program without shell intervention (as with os.spawnv()). If 'cmd' is a
        string it will be passed to the shell (as with os.system()). If
        'bufsize' is specified, it sets the buffer size for the I/O pipes. The
        file objects (child_stdout_stderr, child_stdin) are returned.N(R6RRRRR(RRR:R((RR°scCsd}d}tidjo
d}n|iƒ}dGHt|ƒ\}}|i	|ƒ|i
ƒ|iƒ}|iƒ|jot
d||fƒ‚ndGHyt|gƒ\}}}Wnt|ƒ\}}}nX|i	|ƒ|i
ƒ|iƒ}|iƒ|jot
d||fƒ‚n|iƒ}|ot
d|fƒ‚nxtD]}|iƒq[Wtot
d	ƒ‚nd
GHdS(Ntcatsab cd
tnttmorestesting popen2...swrote %r read %rstesting popen3...sunexpected %r on stderrs_active not emptysAll OK(RtteststrRtnametstriptexpectedRRR
twriteRtreadtgott
ValueErrorRR;RRR1(R;R@RRRR
RCRF((Rt_test¼s>




t__main__(R4Rtsyst__all__tsysconfR'tAttributeErrorRGRRR	R6tplatformRRRtextendRHR2(RKR'RRR	RJRR6RRRHR((Rt?s.			L$





	#


Anon7 - 2021