-2

I am trying to make a simple python program which when run, it will ask a password and if the password is correct, it will open a certain file with a program (or open a program itself). Maybe not the password part but only how to open a file with a program or a program itself. Thanks in advance. ^_^

nazibalalam
  • 154
  • 1
  • 9

1 Answers1

0

https://docs.python.org/3/library/subprocess.html

Above I have linked a library that does just this. It allows you to pass in arguments to run an external command.

Simply import it at the top of your program: import subprocess

Read the documentation linked to find the method that you would like to use to solve your problem (subprocess.call())