how do i open an exe file in python and continue without closing it?

For that you use the subprocess.Popen method like this:

process = subprocess.Popen("notepad.exe", shell=True, stdin=subprocess.PIPE)

You might want to read about pipes and delve deeper into the subprocess module, in case you want to interact in any way with the processes you call using that function.

Related question: How to start a background process in Python?

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top