Package tagger :: Module id3v1 :: Class ID3v1
[show private | hide private]
[frames | no frames]

Class ID3v1


ID3v1 Class

This class parses and writes ID3v1 tags using a very simplified interface.

You can access the ID3v1 tag variables by directly accessing the object attributes. For example:

id3v1 = ID3v1('some.mp3') id3v1.track = 1 print id3v1.songname del id3v1
Method Summary
  __init__(self, filename, mode)
constructor
  __del__(self)
  __getattr__(self, name)
  parse(self)
  seek_to_id3v1(self)
Seek to the ID3v1 tag
  unpad(self, field)

Instance Variable Summary
string album: the album name in iso8859-1
string artist: the artist name in iso8859-1
string comment: comment string.
int genre: genre number
string songname: the songname in iso8859-1
int track: track number
string year: the year of the track

Class Variable Summary
NoneType _f = None                                                                  

Method Details

__init__(self, filename, mode=0)
(Constructor)

constructor

tries to load the id3v1 data from the filename given. if it succeeds it will set the tag_exists parameter.
Parameters:
filename - filename
           (type=string)
mode - ID3_FILE_{NEW,READ,MODIFY}
           (type=constant)

seek_to_id3v1(self)

Seek to the ID3v1 tag

Instance Variable Details

album

the album name in iso8859-1
Type:
string

artist

the artist name in iso8859-1
Type:
string

comment

comment string. limited to 28 characters
Type:
string

genre

genre number
Type:
int

songname

the songname in iso8859-1
Type:
string

track

track number
Type:
int

year

the year of the track
Type:
string

Class Variable Details

_f

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.0 on Sun Apr 10 14:44:01 2005 http://epydoc.sf.net