Replacing os.system() : subprocess « Buildin Module « Python Tutorial






from subprocess import call
import os
res = call(('cat', '/etc/motd'))








14.15.subprocess
14.15.1.Replacing os.system()
14.15.2.Win32 Example
14.15.3.Replacing os.popen()