python ã§ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã«ã¯ subprocess モジュールを使ㆠ以å‰ã«ã‚‚書ã„ãŸã‚“ã ã‘ã©ã€æ°—ã«ãªã£ãŸã®ã§ã€å†åº¦èª¿ã¹ç›´ã—ãŸã€‚ suprocessã§ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ å˜ç´”ã«ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã«ã¯ã€subprocess.call を使ã†ã®ãŒæ¥½ã§ã™ã ãƒãƒƒã‚¯ã‚¯ã‚©ãƒ¼ãƒˆ ` ã‚„os.system ã®ã‹ã‚ã‚Šã« subprocess .call() を使ã†ã‚ˆã†ã§ã™ã€‚ import subprocess cmd = "sleep 30" proc = subprocess.call( cmd , shell=True) 実行ã—ãŸçµæžœã¯ã“ã¡ã‚‰ã€‚(シェル経由) USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND takuya 16804 0.0 0.0 20960 4076 pts/4 Ss 03:49 0:00 /bin/bash ta
{{#tags}}- {{label}}
{{/tags}}