python os.system close program code example Example: how to close an application from python import os os.close(filename);