How can I call a.py program on a server within another local.py program?

Asked

Viewed 38 times

0

I’ve been interacting with a server within a program I’m doing using the os.system() function as if I were using the console itself.

os.system("ssh [email protected] 'comando a ser realizado'")

For everything I had done before (create folders, move files and things in the genre) this function was working, now when I do.

os.system("ssh [email protected] 'python programa.py'")

He seems to have launched the program, but gives no feedback, and it seems to be even running.

  • Maybe the library fabric help you with something

  • program.py is on the target server or the server that is running ssh.

  • Add the argument -t that will work. Example: os.system("ssh -t [email protected] 'python programa.py'")

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.