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:\D ocuments and Settings\Admin\ My
Documents\LimeW ire\Saved\*.mp3 ')
asongs = glob.glob('C:\D ocuments and Settings\Admin\ My
Documents\Downl oads\*\*.mp3')
songs.append(as ongs)
asongs = glob.glob('C:\D ocuments and Settings\Admin\ My
Documents\Downl oads\*\*\*.mp3' )
songs.append(as ongs)
asongs = glob.glob('C:\D ocuments and Settings\Admin\ My
Documents\Downl oads\*\*\*\*.mp 3')
songs.append(as ongs)
pick = random.choice(s ongs)
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 news@netfront.n et --
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:\D ocuments and Settings\Admin\ My
Documents\LimeW ire\Saved\*.mp3 ')
asongs = glob.glob('C:\D ocuments and Settings\Admin\ My
Documents\Downl oads\*\*.mp3')
songs.append(as ongs)
asongs = glob.glob('C:\D ocuments and Settings\Admin\ My
Documents\Downl oads\*\*\*.mp3' )
songs.append(as ongs)
asongs = glob.glob('C:\D ocuments and Settings\Admin\ My
Documents\Downl oads\*\*\*\*.mp 3')
songs.append(as ongs)
pick = random.choice(s ongs)
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 news@netfront.n et --
Comment