doc = subprocess.Popen(['start', '/WAIT', 'file.pdf'], shell=True)
doc.poll()
psutil.Process(doc.pid).get_children()[0].kill()
doc.poll()
How do I launch a file in its default program, and then close it when the script finishes?