Python Forum

Full Version: subprocess open pi then?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
import subprocess

print("Below is the output from the shell script in terminal")
subprocess.call('ssh [email protected]', shell=True)


The above opens my raspi from VS Code, how can i get my vs code on my mac to also have commands run when it opens the pi? Or do i have to run the .py from the pi itself?

Can you use another subprocess module to do this?