-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. ^_^

2
  • 3
    Does this answer your question? How to open any program in Python? Commented Dec 29, 2020 at 6:16
  • No, it did not. Commented Dec 29, 2020 at 11:01

1 Answer 1

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())

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.