Results from os.system() different from execution at prompt
Enno Middelberg
emiddelb at mpifr-bonn.mpg.de
Mon Dec 29 10:48:42 EST 2003
Hi all,
I am using mpeg_encode under Linux to generate little movies. The
parameter file is generated by a Python script, the last line of which is
os.system('mpeg_encode mpeg.par')
When I execute the same command at the bash prompt, the resulting movie
is longer, i.e., it has more frames.
I have piped the outpout from both the Python-executed and
prompt-executed mpeg_encode into files and found a difference, although
the parameter files were the same file in both runs:
Prompt-executed:
MPEG ENCODER STATS (1.5b)
------------------------
TIME STARTED: Mon Dec 29 16:33:08 2003
MACHINE: PC227
FIRST FILE: /homes/emiddelb/local/pics/eberg_movie/webcam/title.jpg
LAST FILE: /homes/emiddelb/local/pics/eberg_movie/webcam/eff_1975
PATTERN: ibbbpbbbpbbb
GOP_SIZE: 30
SLICES PER FRAME: 1
(...)
Python's os.system():
MPEG ENCODER STATS (1.5b)
------------------------
TIME STARTED: Mon Dec 29 16:28:05 2003
MACHINE: PC227
FIRST FILE: /homes/emiddelb/local/pics/eberg_movie/webcam/title.jpg
LAST FILE: /homes/emiddelb/local/pics/eberg_movie/webcam/eff_1
PATTERN: ibbbpbbbpbbb ^^^^^^^^^^^^
GOP_SIZE: 30
SLICES PER FRAME: 1
(...)
So, the Python-executed mpeg_encode reports fewer input files. Any clues
why this could happen? Is there a limit on the command length or so? I
see no reason why the results from the two ways of calling mpeg_encode
should be different.
Kind regards,
Enno
More information about the Python-list
mailing list