Re: [Tutor] MP3Info class usage
Your advice is spot on and I'm well on my way... your Windows installation advice should be in the readme, if anyone's listening :-) Thanks again, Gareth -- View this message in context: http://www.nabble.com/MP3Info-class-usage-tp20934673p21143262.html Sent from the Python - tutor mailing list archive at Nabble.com. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] MP3Info class usage
Todd Zullinger wrote: > > That's hard to guess at. If you can explain what you have done and > how you've installed eyeD3, that would help. > I've not installed it, I've just imported it in my main program. How do you install eyeD3, there's no installation package? I read the readme, which talks about executing 'configure', but that just reports back that it is not recognized as an internal or external command, operable program or batch file. Clearly I'm missing a huge step, can you help me out? -- View this message in context: http://www.nabble.com/MP3Info-class-usage-tp20934673p21071143.html Sent from the Python - tutor mailing list archive at Nabble.com. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] MP3Info class usage
Okay, I've moved over to eyeD3.py... fif nothing else, the documentation for it's usage is far superior. However, I can't get anything to run. The help gives examples of some simple tasks, but as soon as I 'import eyeD3', not even calling any functions within it, I start getting errors such as: In eyeD3.py, the 'from eyeD3.tag import *;' line (and similar) didn't work until I removed the 'eyeD3.' part and just imported 'tag'. Then in tag.py, some of the class defs complained about undefined variables, for example 'def link(self, f, v = ID3_ANY_VERSION)' needed to have quotes around 'ID3_ANY_VERSION'. Now these issues are addressed I have an error in mp3.py, 'class EyeD3Driver(eyeD3.utils.FileHandler) NameError: name 'eyeD3' is not defined. I'm baffled that I'm having to jump through so many hoops because I imported eyeD3... is this typical? What have I done wrong? Cheers, Gareth Todd Zullinger wrote: > > I'd recommend eyeD3¹ and/or mutagen² for tag reading. Both are pretty > easy to use. > > ¹ http://eyed3.nicfit.net/ > ² http://code.google.com/p/quodlibet/wiki/Development/Mutagen > > -- View this message in context: http://www.nabble.com/MP3Info-class-usage-tp20934673p20980334.html Sent from the Python - tutor mailing list archive at Nabble.com. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] MP3Info class usage
Has anyone ever used MP3Info to retrieve the ID3 tags from an MP3? It seems to be a well written class that can access ID3 tags in v.1 or v.2, but I've not used classes before and I'm struggling to figure out how to use it. Given that, for testing purposses, I have a property called 'testfile' set to the path of a valid MP3 file, I then try to output the artist name with the following, where ID3v2 is a class defined in MP3Info: song = ID3v2(testfile) print '\nArtist is: %s' % (song.artist) When I execute this script I get an error, "AttributeError: 'str' object has no attribute 'seek'". Is this a bug in the class or am I not using it correctly? Has anyone any better suggestions for retreiving ID3 tags from an MP3 file using python? Regards, Gareth -- View this message in context: http://www.nabble.com/MP3Info-class-usage-tp20934673p20934673.html Sent from the Python - tutor mailing list archive at Nabble.com. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor