Well the othe day I was making a program to make a list of all the songs in
certian directorys but I got a problem, only one of the directorys was added
to the list. Heres my code:
import random
import os
import glob
songs = glob.glob('C:\Documents and Settings\Admin\My
Documents\LimeWire\Saved\*.mp3')
asongs = glob.glob('C:\Documents and Settings\Admin\My
Documents\Downloads\*\*.mp3')
songs.append(asongs)
asongs = glob.glob('C:\Documents and Settings\Admin\My
Documents\Downloads\*\*\*.mp3')
songs.append(asongs)
asongs = glob.glob('C:\Documents and Settings\Admin\My
Documents\Downloads\*\*\*\*.mp3')
songs.append(asongs)
pick = random.choice(songs)
all goes well but pick awalys is from the first directory but songs awalys
includes all the files I want it to. Im baffaled.
-- Posted on news://freenews.netfront.net - Complaints to [EMAIL PROTECTED] --
--
http://mail.python.org/mailman/listinfo/python-list