Hola, Creo que debes usar subprocess.Popen que retorna un stdout que se comporta como un archivo (que es lo que espera stdin) en lugar de run que retorna el resultado en un string.
import subprocess size = 32 random = subprocess.Popen(['head', '-c {}'.format(3 * size * size), '/dev/urandom'], stdout=subprocess.PIPE) result = subprocess.Popen(['convert', '-depth', '8', '-size', '{}x{}'.format(size, size), 'RGB:-', 'random2.png'], stdin=random.stdout, stdout=subprocess.PIPE) 2018-06-04 20:10 GMT-05:00 Jose Caballero <jcaballero....@gmail.com>: > > > > Falla y da un error de que: > > convert-im6.q16: unrecognized option `-size8x8' @ > > > > > ?te falta un espacio en blanco entre "-size" y "8x8"? > _______________________________________________ > Python-es mailing list > Python-es@python.org > https://mail.python.org/mailman/listinfo/python-es >
_______________________________________________ Python-es mailing list Python-es@python.org https://mail.python.org/mailman/listinfo/python-es