1

My question contains more details, but the bottom line is that I need a general idea of how to call my other Python program (or functions) from another program on another computer, what do i need (i.e. Sockets?) What I'm doing is building a Python UI application, this application shall connect to a Raspberry Pi Python GPIO script running on the RPi to control pins (i.e LED's), I'm not sure if these details are relevant, but most importantly is how to basically make the two programs talk to each other?

2
  • Do you have ssh access to Raspberry Pi? Commented May 20, 2016 at 0:02
  • sure i do, i thought of that too, just not sure how to make both programs talk Commented May 20, 2016 at 0:04

1 Answer 1

1

Paramiko library could be one of the solutions here:

import paramiko

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(host, username=username, password=password, port=port, timeout=30)  # setting up ssh connection 
ssh.exec_command('<Execute Your Remote Script here>')
ssh.close()
Sign up to request clarification or add additional context in comments.

1 Comment

Please check this topic to choose library that suits you best: stackoverflow.com/questions/995944/ssh-library-for-java

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.