0

I am trying to call a python program which just sends me a text on my phone from a Sikuli script.I am a beginner and my goal is to receive a text when a certain loop is finished, but I don't know how to call on it from the Sikuli script. This is a small part of my code from Sikuli so far.

while (something):
     if (randomThing):
       something = False


subprocess.Popen("python SendSMS.py")

I get an OS error saying no such file or directory. Is there a better way to do this? or what am I doing wrong here? I am using Mac.

Eugene S
  • 6,709
  • 8
  • 57
  • 91

1 Answers1

0

subprocess.Popen() will look for SendSMS.py in same directory but if your script is not in that directory you will get find not found error which is totally expected. As a fix you will need to provide whole path to your script instead of just python SendSMS.py replace it with python /home/my_user/SendSMS.py and check if it works.

Mahesh Karia
  • 2,045
  • 1
  • 12
  • 23