[Tutor] Better way - fnmatch with list ? CORRECTION
jervisau at gmail.com
Sat Jan 3 01:16:50 CET 2009
On Sat, Jan 3, 2009 at 10:48 AM, bob gailer <bgailer at gmail.com> wrote:
> bob gailer wrote:
>> for fn in files:
>> base, ext = os.path.splitext(fn)
>> if ext in ['.flac','.mp3','.m4a']: ## CORRECTION removed *
for fn in files:
base, ext = os.path.splitext(fn)
if ext.lower() in ['.flac', '.mp3', '.mp4']:
takes into account systems with case sensitive filenames.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor