You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First things first: While staying for a while with the elder sister of Delegator.py, envoy, we salute you for giving this another attempt to finally regain sanity on Python subprocess handling. We are really looking forward to the outcome, cheers!
After successfully using it for a basic program called formailx.py, we just tried to apply Delegator.py to a slightly more advanced scenario.
Problem
We want to pipe binary data to the STDIN channel of a process and read its binary output from the STDOUT channel.
It is about image conversion using ImageMagick, so let's assume the command we want to execute is
convert - png:-
and we are trying to run Delegator.py like
with open(tiff_file, 'rb') as tiff:
proc = delegator.run(command)
proc.send(tiff.read())
png = proc.out
Following the documentation, we also tried various combinations of the block and binary parameters and attempted to call proc.block() after proc.send(), but everything without success yet.
Status quo
We either get RuntimeError: send can only be used on non-blocking commands. as an answer or the program stalls completely when accessing proc.out .
Dear Kenneth,
Introduction
First things first: While staying for a while with the elder sister of Delegator.py, envoy, we salute you for giving this another attempt to finally regain sanity on Python subprocess handling. We are really looking forward to the outcome, cheers!
After successfully using it for a basic program called formailx.py, we just tried to apply Delegator.py to a slightly more advanced scenario.
Problem
We want to pipe binary data to the STDIN channel of a process and read its binary output from the STDOUT channel.
It is about image conversion using ImageMagick, so let's assume the command we want to execute is
and we are trying to run Delegator.py like
Following the documentation, we also tried various combinations of the
block
andbinary
parameters and attempted to callproc.block()
afterproc.send()
, but everything without success yet.Status quo
We either get
RuntimeError: send can only be used on non-blocking commands.
as an answer or the program stalls completely when accessingproc.out
.On the other hand, everything works fine when using the pure
subprocess
module, seerun_command
in "util.py" from Patent2net/P2N#26.Help?
Can we humbly ask you to take a look into this?
Thanks in advance for your efforts!
With kind regards,
Andreas.
The text was updated successfully, but these errors were encountered: