subprocess
intends to replace os.system
os.spawn*
from subprocess import Popen proc = Popen(['gvim', __file__]) print('pid = {}'.format(proc.pid))
check_output
runs a command and returns the command's output. >>> print(subprocess.check_output('xclip -o', shell=True).decode('utf8'))