This code is working:
try:
ffmpeg_proc = subprocess.Popen(queue[position].ffmpeg_cmd,
stdout=subprocess.PIPE, stderr=open(os.devnull, 'w'))
except WindowsError as exc:
log_windows_error(exc, queue[position].ffmpeg_cmd, 'critical')
break
if
Andrew Berg wrote:
Okay, so I've refactored those except WindowsError blocks into calls to
a function and fixed the os.devnull bug, but I still can't get the
triple chain working. I added calls to ffmpeg_proc.stdout.close() and
sox_proc.stdout.close(), but I really am not sure where to put
On 2011.07.01 02:26 AM, Peter Otten wrote:
I can't reproduce your setup, but I'd try using communicate() instead of
wait() and close().
I don't really know what communicate() does. The docs don't give much
info or any examples (that explain communicate() anyway), and don't say
when
On Fri, Jul 1, 2011 at 1:02 AM, Andrew Berg bahamutzero8...@gmail.com wrote:
On 2011.07.01 02:26 AM, Peter Otten wrote:
I can't reproduce your setup, but I'd try using communicate() instead of
wait() and close().
I don't really know what communicate() does.
Read data from stdout and stderr,
Okay, so I've refactored those except WindowsError blocks into calls to
a function and fixed the os.devnull bug, but I still can't get the
triple chain working. I added calls to ffmpeg_proc.stdout.close() and
sox_proc.stdout.close(), but I really am not sure where to put them. The
following code
I'm working on an audio/video converter script (moving from bash to
Python for some extra functionality), and part of it is chaining the
audio decoder (FFmpeg) either into SoX to change the volume and then to
the Nero AAC encoder or directly into the Nero encoder. This is the
chunk of code from my
Andrew Berg wrote:
I'm working on an audio/video converter script (moving from bash to
Python for some extra functionality), and part of it is chaining the
audio decoder (FFmpeg) either into SoX to change the volume and then to
the Nero AAC encoder or directly into the Nero encoder. This is
On 2011.06.28 01:32 AM, Peter Otten wrote:
subprocess.call([ls], stdout=open(os.devnull, w))
0
D'oh! Not sure why I was thinking os.devnull was a file object. :-[
Start with factoring out common code into a good old function.
For some reason I was thinking I would have problems doing that, but
On Mon, Jun 27, 2011 at 11:47 PM, Andrew Berg bahamutzero8...@gmail.com wrote:
On 2011.06.28 01:32 AM, Peter Otten wrote:
subprocess.call([ls], stdout=open(os.devnull, w))
0
D'oh! Not sure why I was thinking os.devnull was a file object. :-[
On the bright side, I think in part due to this
Am 28.06.2011 07:57 schrieb Andrew Berg:
I'm working on an audio/video converter script (moving from bash to
Python for some extra functionality), and part of it is chaining the
audio decoder (FFmpeg) either into SoX to change the volume and then to
the Nero AAC encoder or directly into the Nero
On 2011.06.28 02:44 AM, Thomas Rachel wrote:
The way you work with the exception is not the very best - instead of
parsing the stringified exception, you better would trigger on
exc.winerror (it is an integer with the error number).
Or, even better, just pas the error information contained
11 matches
Mail list logo