<s> from pyid3v2 import * <EOL> import sys , string <EOL> def strip_newline ( data ) : <EOL> for i in range ( <NUM_LIT:0> , len ( data ) ) : <EOL> if data [ i ] == '<STR_LIT:\n>' : <EOL> return data [ i + <NUM_LIT:1> : ] <EOL> return data <EOL> for filename in sys . argv [ <NUM_LIT:1> : ] : <EOL> print "<STR_LIT>" % filename <EOL> try : <EOL> id3 = ID3v2 ( filename , ID3V2_FILE_READ ) <EOL> for f in id3 . frames : <EOL> if f . fid [ <NUM_LIT:0> ] == '<STR_LIT:T>' : <EOL> print f . fid , f . fields <EOL> except ID3Exception : <EOL> print "<STR_LIT>" <EOL> try : <EOL> id3v1 = ID3v1 ( filename ) <EOL> id3v1 . parse ( ) <EOL> print id3v1 . tag <EOL> except AttributeError : <EOL> print "<STR_LIT>" </s>
