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/21573/task/21573/root/proc/21572/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/task/21573/root/proc/21572/root/usr/lib64/python2.4/commands.pyo
mò
‚=5Dc@sFdZdddgZd„Zd„Zd„Zd„Zd„Zd	S(
s-Execute shell commands via os.popen() and return status, output.

Interface summary:

       import commands

       outtext = commands.getoutput(cmd)
       (exitstatus, outtext) = commands.getstatusoutput(cmd)
       outtext = commands.getstatus(file)  # returns output of "ls -ld file"

A trailing newline is removed from the output string.

Encapsulates the basic operation:

      pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
      text = pipe.read()
      sts = pipe.close()

 [Note:  it would be nice to add functions to interpret the exit status.]
tgetstatusoutputt	getoutputt	getstatuscCstdt|ƒƒS(s-Return output of "ls -ld <file>" in a string.sls -ldN(Rtmkargtfile(R((t /usr/lib64/python2.4/commands.pyR!scCst|ƒdS(s=Return output (stdout or stderr) of executing cmd in a shell.iN(Rtcmd(R((RR*scCs{dk}|id|ddƒ}|iƒ}|iƒ}|djo
d}n|ddjo|d }n||fS(s4Return (status, output) of executing cmd in a shell.Ns{ s; } 2>&1triiÿÿÿÿs
(	tostpopenRtpipetreadttexttclosetststNone(RRR
RR((RR2s	

cCs"dk}t|ii||ƒƒS(N(RRtpathtjointheadtx(RRR((Rtmk2arg?s	cCsgd|jod|dSnd}x3|D]+}|djo|d}n||}q*W|d}|S(Ns's 's "s\$"`s\t"(Rtstc(RRR((RRKs


N(t__doc__t__all__RRRRR(RRRRRR((Rt?s				
	

Anon7 - 2021