2018-06-25から1日間の記事一覧
調べてみると色んなやり方が見つかりましたが、自分にとって一番シンプルだったやり方を。 import subprocess bashCommand = "ls -alt" output = subprocess.Popen(bashCommand, stdout=subprocess.PIPE, shell=True).communicate()[0] print(output) コマン…
調べてみると色んなやり方が見つかりましたが、自分にとって一番シンプルだったやり方を。 import subprocess bashCommand = "ls -alt" output = subprocess.Popen(bashCommand, stdout=subprocess.PIPE, shell=True).communicate()[0] print(output) コマン…