I wanted to do a query of UniProt, to retrieve all the E.C. numbers that it has for D. melanogaster proteins. I found that you can use a query language called 'sparql' for this http://sparql.uniprot.org/. I found that this was the sparql query to get all the E.C. numbers for D. melanogaster proteins:
SELECT ?protein ?enzyme
?protein a up:Protein .
?protein up:organism taxon:7227 .
?protein up:enzyme ?enzyme .