python获取mp3文件信息,python获取mp3,需要安装ID3 包。im
python获取mp3文件信息,python获取mp3,需要安装ID3 包。im
需要安装ID3 包。
import os, sysfrom ID3 import *files = os.listdir(os.getcwd())for f in files: x = os.path.splitext(f) if x[1] == '.mp3': n = x[0].split(' - ') author = n[0] title = n[1] id3info = ID3(f) id3info['ARTIST'] = author id3info['TITLE'] = title print f+' id3 tagged.'print 'Done!'
相关内容
- python 网络爬虫,python爬虫,[Python]代码#F
- Python 的多进程 fork,python进程fork,Python 的多进程
- Python初学教程:为函数参数指定默认值,python默认值
- Python初学教程:变量的作用域,python初学变量,如下代码
- 将一个Etree XML结构转换为一个Python dict+list格式的代码,
- Python初学教程:Python的异常处理机制,python异常处理
- Python初学教程:del 操作符使用示例,python操作符,pyth
- Python多进程 在进程间共享数据,python进程,由于GIL的原
- Python 多进程中使用共享内存在进程之间共享数据,py
- Python多进程multiprocessing使用示例,,由于要做把一个多线
评论关闭