This question already has answers here:
Closed 7 years ago.
Supposing I wanted to see the Artist Name? Or add BPM information? What Python tools could I go about doing this?
There's a module called Python-ID3 that does exactly this. If you're on a Debian/Ubuntu box, its package name is python-id3
and there is example code on its website:
from ID3 import *
try:
id3info = ID3('/some/file/moxy.mp3')
print id3info
id3info['TITLE'] = "Green Eggs and Ham"
id3info['ARTIST'] = "Moxy Früvous"
for k, v in id3info.items():
print k, ":", v
except InvalidTagError, message:
print "Invalid ID3 tag:", message