On Friday, 3 March 2017 15:00:00 GMT Ralph Corderoy wrote:
> mpg321 has a -l option to loop N times.  If N is 0 then forever.  So
> your callback starts mpg321 with -l and gives it the sorted list of all
> the MP3s in the current playlist-directory entry, e.g.
> `valkyries/*.mp3'.  Then it forgets all about it until it's time to
> SIGTERM it.

Except it doesn't (for me anyway).

If I issue the command:

        mpg321 -l ./Playlist1/*.mp3

in a shell it works.  In my Python program it doesn't, even if I explicitly 
change directory to the one containing the files and format my statement as:

mp3_player = subprocess.Popen(['mpg321', '-q', '-m', '-a', 'hw:0,0', '*.mp3'])

If I use:

mp3_player = subprocess.Popen(['mpg321', '-q', '-m', '-a', 'hw:0,0', '01 
Marche Episcopale.mp3'])

it works.

If I use:

mp3_player = subprocess.Popen(['mpg321', '-q', '-m', '-a', 'hw:0,0', *.mp3])

(eg no quotes around the *.mp3), I get a syntax error on the asterisk.

Can this be escaped somehow?  Or is there something else that I've missed?

-- 



                Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-03-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:[email protected] / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to