[Tutor] Newbie Wondering About Threads

Kent Johnson kent37 at tds.net
Mon Dec 8 03:35:34 CET 2008


On Sun, Dec 7, 2008 at 3:10 PM, Damon Timm <damontimm at gmail.com> wrote:

> I think I did it!  Woo hoo!  (cheers all around! drinks on me!)

Cool! Where are we meeting for drinks? ;-)

> flacFiles = [["test.flac","test.mp3"],["test2.flac","test2.mp3"],\
>        ["test3.flac","test3.mp3"],["test4.flac","test4.mp3"],\
>        ["test5.flac","test5.mp3"],["test6.flac","test6.mp3"]]

There is no need to include both the flac file name and the mp3 file
name if the roots match. You can use os.path functions to split the
extension or the quick-and-dirty way:
  mp3file = flacfile.rsplit('.', 1)[0] + '.mp3'

Kent


More information about the Tutor mailing list