I am trying to run gphoto2 from python, but without any success. It just returns a command not found. gphoto is installed correctly, as in, the commands work fine in the terminal.
p = subprocess.Popen(['gphoto2'], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, executable='/bin/bash') for line in p.stdout.readlines(): print line p.wait() /bin/bash: gphoto2: command not found
I know that there is something funny in the osx terminal (application), but my knowledge of osx is scarce.
Any thoughts on this?
EDIT
changed part of my code, other errors appeared
p = subprocess.Popen(['gphoto2'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) for line in p.stdout: print line raise child_exception OSError: [Errno 2] No such file or directory
EDIT
using the full path '/ opt / local / bin / gphoto2'
but if someone wants to explain which shell to use or how to enter the system and have the same functionality.?
Aduen
source share