手机
当前位置:查字典教程网 >脚本专栏 >python >Python从MP3文件获取id3的方法
Python从MP3文件获取id3的方法
摘要:本文实例讲述了Python从MP3文件获取id3的方法。分享给大家供大家参考。具体如下:defgetID3(filename):fp=ope...

本文实例讲述了Python从MP3文件获取id3的方法。分享给大家供大家参考。具体如下:

def getID3(filename): fp = open(filename, 'r') fp.seek(-128, 2) fp.read(3) # TAG iniziale title = fp.read(30) artist = fp.read(30) album = fp.read(30) anno = fp.read(4) comment = fp.read(28) fp.close() return {'title':title, 'artist':artist, 'album':album, 'anno':anno}

希望本文所述对大家的Python程序设计有所帮助。

【Python从MP3文件获取id3的方法】相关文章:

vc6编写python扩展的方法分享

python中的yield使用方法

python 实现堆排序算法代码

python 合并文件的具体实例

Python open读写文件实现脚本

Python的函数嵌套的使用方法

python 实现归并排序算法

python读文件逐行处理的示例代码分享

Python下singleton模式的实现方法

python字典多条件排序方法实例

精品推荐
分类导航