[Tutor] mp3 range violation reportage.
D-Man
dsh8290@rit.edu
Mon, 28 May 2001 22:17:19 -0400
On Mon, May 28, 2001 at 01:04:19AM -0500, Tesla Coil wrote:
| On 27 May 2001, Doug Stanfield replied:
| > Completely speculation, but it may be that the text output
| > from the program is to standard error not standard output.
| > If you tried to use popen2.popen3 you might get something.
|
| And correct completely speculation it is:
|
| >>> import popen2
| >>> this = popen2.popen3('mpg123 -t -c Raw_Power.mp3')
| >>> that = this[2]
| >>> andtheother = that.readlines()
| >>> andtheother[8]
| 'Playing MPEG stream from Raw_Power.mp3 ...\012
|
| Thanks. Haven't done anything with popen2 before.
BTW, for the bash equivalent use file descriptor '2'. Ex:
# redirect stderr to stdout, redirect stdout to a file
mpg123 2>&1 > a_file
# redirect only stderr to a file, let stdout stay on the terminal
mpg123 2>a_file
-D