kevin parks wrote:
John,
Thanks... i am liking this variation a tad more since it means i only
have to type the path in one place but it is akin to your second
one... i was (still am really) having a hard time understanding
how to apply path.join _and_ listdir sometimes list
howdy,
I am using the os module to do some of my heavy lifting for me. I am
tried of building lists
by hand so i decided that i would get python to look in a bunch of
directories and stuff all the things it
find there into a list depending on it's extension.
Works great ... one problem
On 27/02/06, kevin parks [EMAIL PROTECTED] wrote:
snd = [f for f in os.listdir('/Users/kevin/snd/') if f.endswith('.aif')]
If this is all you need, then you could do something like:
snd = ['/Users/kevin/snd/%s' % f for f in
os.listdir('/Users/kevin/snd/') if f.endswith('.aif')]
Or, slightly
John Fouhy wrote:
On 27/02/06, kevin parks [EMAIL PROTECTED] wrote:
snd = [f for f in os.listdir('/Users/kevin/snd/') if f.endswith('.aif')]
If this is all you need, then you could do something like:
snd = ['/Users/kevin/snd/%s' % f for f in
os.listdir('/Users/kevin/snd/') if