1、Python中执行命令例子1:[root@localhostopt]#catpyls.py
#!/usr/bin/envpython
#pythonwrapperforthelscommand
importsubprocess
subprocess.call(["ls","-l"])例子2:[root@localhostopt]#catpysysinfo.py
#!/usr/bin/envpython
importsubprocess
#Command1
uname="uname"..
分类:
编程语言 时间:
2016-06-30 14:51:04
阅读次数:
243