2017-05-05 Pythonコードの中でシェルを使う Python shell linux Pythonのスクリプトの中からシェルのコマンドを呼び出して使う。 $ python >>> import commands >>> commands.getoutput("<任意のコマンド>")