【问题标题】:Linux command line instructions from python [duplicate]来自python的Linux命令行指令[重复]
【发布时间】:2015-09-05 06:43:27
【问题描述】:

有没有直接从python shell发出命令行指令的方法?

【问题讨论】:

标签: python ubuntu command-line terminal


【解决方案1】:

你可以使用os.system -

import os
os.system('<command line instruction>')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-02
    • 1970-01-01
    • 2016-12-03
    • 1970-01-01
    • 2013-05-27
    • 2017-02-17
    相关资源
    最近更新 更多