Open Antrikshy opened 10 years ago
Super belated follow-up:
You've found a bug with the use of images as direct arguments. Originally, colorific was intended to be passed in images one at a time on stdin. The exit behaviour is correct if you call it this way.
>>> import subprocess
>>> subprocess.check_output(['colorific'], input=b'nasa_ares_logo.png')
b'nasa_ares_logo.png\t#0065b9,#bbd6ec,#ff0000\t\n'
Hope that helps.
I can do
colorific photo.jpg
from Terminal just fine, but when I try this in Python, it fails:Here,
colorific_param
is justphoto_0.jpg
. I get:Any ideas? I am not adamant on using
subprocess
, but it just felt easier. I can include colorific in my code if I can figure out how to import it. I just want the functionality that I get when normally using the command and I was unsure on which function to call from my script.The expected end result is a list or dictionary of output (as strings) from several photos in the current directory.