Re: [Python-es] ¿Hacer un | en plan bash con Subprocess.Popen?

2018-06-05 Por tema Jordi Funollet
'shlex' me ha salvado a menudo de estos errores. import subprocess import shlex cmd = shlex.split('''convert -depth 8 -size{}x{} RGB:- /tmp/random.png'''.format(size, size)) result = subprocess.run(cmd, stdin=result.stdout, stdout=subprocess.PIPE) -- Jordi Funollet Pujol http://www.linkedin.co

Re: [Python-es] ¿Hacer un | en plan bash con Subprocess.Popen?

2018-06-05 Por tema Miguel de Dios Matias
Uy gracias. El mar., 5 jun. 2018 10:50, Jordi Funollet escribió: > 'shlex' me ha salvado a menudo de estos errores. > > import subprocess > import shlex > > cmd = shlex.split('''convert -depth 8 -size{}x{} RGB:- > /tmp/random.png'''.format(size, size)) > result = subprocess.run(cmd, stdin=result