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. ^_^
Asked
Active
Viewed 151 times
-2
-
3Does this answer your question? [How to open any program in Python?](https://stackoverflow.com/questions/48483765/how-to-open-any-program-in-python) – M Z Dec 29 '20 at 06:16
-
No, it did not. – nazibalalam Dec 29 '20 at 11:01
1 Answers
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())

Toby Klauder
- 84
- 8