how to close a program in windows using python code example Example: how to close an application from python import os os.close(filename);