![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
meng_tianshi
这个作者很懒,什么都没留下…
展开
-
Python中如何调用shell命令
python调用shell命令的方法有许多 1.1 os.system(command) 在一个子shell中运行command命令,并返回command命令执行完毕后的退出状态。这实际上是使用C标准库函数system()实现的。这个函数在执行command命令时转载 2011-08-10 15:57:53 · 3526 阅读 · 0 评论 -
python中的shell操作
首先介绍一个函数: os.system(command) 这个函数可以调用shell运行命令行command并且返回它的返回值。试一下在python的解释器里输入os.system(”ls-l”),就可以看到”ls”列出了当前目录下的文件。可以说,通过这个函数,python就转载 2011-08-12 16:18:51 · 2390 阅读 · 0 评论