old_contents: #!/usr/bin/python
  # -*- coding: utf-8 -*-
  #CELIA GARCIA FERNANDEz
  
  
  from xml.sax import make_parser
  from xml.sax.handler import ContentHandler
  import smallsmilhandler
  import sys
  
  
  
  
  if __name__ == "__main__":
  
      parser = make_parser()
      small = smallsmilhandler.SmallSMILHandler()
      parser.setContentHandler(small)
      
      try:
          fich = open(sys.argv[1],'r')       
      except IOError:
  	    print "Usage: python karaoke.py file.smil"
  	    raise SystemExit
  	        
      parser.parse(fich)
      print small.get_tags()
  
new_contents: #!/usr/bin/python
  # -*- coding: utf-8 -*-
  #CELIA GARCIA FERNANDEz
  
  
  from xml.sax import make_parser
  from xml.sax.handler import ContentHandler
  import smallsmilhandler
  import sys
  
  
  if __name__ == "__main__":
  
      parser = make_parser()
      small = smallsmilhandler.SmallSMILHandler()
      parser.setContentHandler(small)
      
      try:
          fich = open(sys.argv[1],'r')       
      except IOError:
  	    print "Usage: python karaoke.py file.smil"
  	    raise SystemExit
  	        
      parser.parse(fich)
      lista = small.get_tags()
                      
      for diccionario in lista:
          print diccionario["name"],
          for etiqueta in diccionario:
              if diccionario[etiqueta] and etiqueta != "name":
                   print "\t" + etiqueta + '="' + diccionario[etiqueta] + '"',
          print            
              
              
              
              
              
              
  
  
subject: Imprime la lista como se pide en el apartado 4