|
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/commands.pyc |
| Size | 2.43 kb |
| Permission | rw-r--r-- |
| Owner | apache |
| Create time | 23-Dec-2025 17:41 |
| Last modified | 20-Jun-2019 19:45 |
| Last accessed | 22-Apr-2026 05:28 |
| Actions | edit | rename | delete | download (gzip) |
| View | text | code | image |
Ñò
§ÚêLc @ sF d Z d d d g Z d � Z d � Z d � Z d � Z d � Z d 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.]
t getstatusoutputt getoutputt getstatusc C s3 d d k } | i d t d � t d t | � � S( s- Return output of "ls -ld <file>" in a string.iÿÿÿÿNs"
§ÚêLc @ sF d Z d d d g Z d � Z d � Z d � Z d � Z d � Z d 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.]
t getstatusoutputt getoutputt getstatusc C s3 d d k } | i d t d � t d t | � � S( s- Return output of "ls -ld <file>" in a string.iÿÿÿÿNs"