So, I have an external application which I put it in my /opt/app/bin/thisapp directory. The application can be executed via command line and will give output to stdout. I add /opt/app/bin/ to my environment variable. Basically, I can call thisapp in my terminal and produce an output.
I am trying to call this application inside a python and capture its output inside python. This is my script (really simple):
from subprocess import call
call(["thisapp"])
It ressults in an error
OSError: [Errno 13] Permission denied
I already make sure to chmod 777 -R in the directory but still same. Then I am trying to call the absolute path of this app which is:
call(["/opt/app/bin/thisapp"])
This time, the error is:
OSError: [Errno 2] No such file or directory
Can anyone suggest what should I do? I am really new to python.