-1

I wanted to open apps like calculator, camera, and other apps using the python OS module how can I use the os.startfile() function to open apps like this?

  • 2
    Welcome to Stackoverflow. Please take the [tour](https://stackoverflow.com/tour) and read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) – Lucan May 10 '21 at 10:05

2 Answers2

0

It's very simple

import os
os.system("program_name") # To open any program by their name recognized by windows
#for example
os.system("notepad")

There you go

0

You can simply use the os module

import  os
# call startfile method to “start” a file with its associated (default) program
os.startfile(filepath)
Mahrez BenHamad
  • 977
  • 8
  • 13