[geeks] LAME

Dave Kimmel crisco_kid at shaw.ca
Mon Jul 29 11:15:50 CDT 2002


On Mon, 29 Jul 2002 matty91 at bellsouth.net wrote:

> Do you have any notes from when you did this? Always helpful to have a
> jumpstart :)

I don't remember where I got the ID3 module, but you can probably find it
on www.python.org.

The code for manipulating the ID3 info is really simple.  You just create
the ID3 object like this:

id3info = ID3.ID3(filename)

Then treat it just like a dictionary object, like this:

for x in id3info.keys():
      id3info[x] = ''
id3info['ARTIST'] = 'Some Artist'
id3info['TITLE'] = 'Title'

There is a method to save the data, but it's not needed.  The object
automatically saves the ID3 when it is garbage collected (which is also
automatic).

Ahh, here it is, with examples:  http://id3-py.sourceforge.net/

-- Dave Kimmel
   crisco_kid at shaw.ca



More information about the geeks mailing list