Commit c226d5c7 by BellCodeEditor

save project

parent 5865c457
Showing with 1 additions and 1 deletions
...@@ -20,7 +20,7 @@ play_button = stop_img #按钮样式变量 ...@@ -20,7 +20,7 @@ play_button = stop_img #按钮样式变量
#音乐 #音乐
music_list = [] #歌曲列表 music_list = [] #歌曲列表
path = "C:\\Users\\dundun\\Desktop\\Python专区\\玛酷\\课程\\pygame\\课题\\音乐播放器\\代码" #路径变量,所有\都要改成\\ path = "C:\\Users\\dundun\\Desktop\\Python专区\\玛酷\\课程\\pygame\\课题\\音乐播放器\\配置文件" #路径变量,所有\都要改成\\
filelist = os.listdir(path) #取出path中所有文件名 filelist = os.listdir(path) #取出path中所有文件名
for i in filelist: for i in filelist:
if i[-4:] == ".ogg" or i[-4:] == ".wav": #切片(右不包括),如果i的倒数第4-1个字符等于.ogg/.wav if i[-4:] == ".ogg" or i[-4:] == ".wav": #切片(右不包括),如果i的倒数第4-1个字符等于.ogg/.wav
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment