Created
August 21, 2017 18:57
-
-
Save akisatok/e4254d21de24f9c8a6cbf1743d3769f2 to your computer and use it in GitHub Desktop.
Pythonからコマンドを呼び出す(Windows編) ref: http://qiita.com/_akisato/items/d97b17064df158f0dea0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
cmd = 'myprogram myargs' | |
returncode = subprocess.call(cmd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
cmd = 'myprogram myargs' | |
returncode = subprocess.Popen(cmd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
cmd = 'dir .' | |
returncode = subprocess.Popen(cmd, shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment