Hi, I have a simple command-line radio player and I want to extract song titles from the output of mplayer.
Example: $ mplayer http://relay2.slayradio.org:8000/ It produces a streamed output of this form: MPlayer2 UNKNOWN (C) 2000-2012 MPlayer Team mplayer: could not connect to socket mplayer: No such file or directory ... ICY Info: StreamTitle='Alexander 'Taxim' Nev - Unsound minds feat. SAM';StreamUrl='http://www.SLAYRadio.org/'; ... At the end it shows a progress indicator, thus the output is streamed. The problem is I can't get this output in a string. My idea is to launch mplayer with a timeout of 2 seconds for instance, get the produced output and find the line that starts with "ICY Info". But when I kill the process after the timeout, I don't know how to fetch the output produced so far. Thanks, Laszlo -- https://mail.python.org/mailman/listinfo/python-list