python获得linux下的所有挂载点(mount points)
# execute the external "mount" command and parse the output. import commands mount = commands.getoutput('mount -v') lines = mount.split('\n') points = map(lambda line: line.split()[2], lines) print points
python获得linux下的所有挂载点(mount points)
# execute the external "mount" command and parse the output. import commands mount = commands.getoutput('mount -v') lines = mount.split('\n') points = map(lambda line: line.split()[2], lines) print points