[BioPython] Interacting with GenBank

Kari Linder kal03 at hampshire.edu
Sat Mar 26 11:50:30 EST 2005


Here is the script I am working with :

from Bio.WWW import NCBI


search_command = 'Search'
search_database = 'Nucleotide'
return_format = 'Fasta'
search_term = 'Ciliphora'


result_handle = NCBI.query(search_command, search_database, term = 
search_term, doptcmdl = return_format)

import os

result_file_name = os.path.join(os.getcwd(), 'results.html')
result_file = open(result_file_name, 'w')
result_file.write(result_handle.read())
result_file.close()

It is basically from section  "2.5 Connecting with biological 
databases" in the biopython tutorial, and it works being that it gives 
me an html file, however when I open the file it says that the results 
cannot be displayed. Has anyone had this problem?

Thanks
Kari



More information about the BioPython mailing list