python opens an instance of an windows application

  • 2021-07-03 00:40:38
  • OfStack

You can add time judgment to start the program at a fixed time.


#coding=utf-8
#!/usr/bin/python
import os
def open_app(app_dir):
  os.startfile(app_dir)
if __name__ == "__main__":
  app_dir = r'C:\Program Files\Sublime Text 2\sublime_text.exe'
  open_app(app_dir)

Related articles: