Answers for "open program with python"

2

open applications by python

dir = 'C:\\myprogram.exe'

import os
os.startfile(dir)
os.system(dir)

import subprocess
subprocess.Popen([dir])
subprocess.call(dir)
Posted by: Guest on July-20-2020
3

how to close an application from python

import os
os.close(filename);
Posted by: Guest on April-02-2020

Python Answers by Framework

Browse Popular Code Answers by Language