方法一:使用commands.getoutput调用shell命令df获取磁盘使用率:import commands >>> import commands >>> disk_use=commands.getoutput('df -h') >>> disk_use 'Filesyste
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号