[Biopython-dev] Changes in WWW BLAST format

Brad Chapman chapmanb at arches.uga.edu
Thu Oct 12 14:10:36 EDT 2000


Hey all;
	I was working on the BLAST documentation, and while whipping up
an example for WWWBlast, noticed that it seems like the html output has
changed (again). It looks like the culprits are a new <p> tag, and a
</PRE> tag in place of a blank line. The output version is 2.1.1, I
believe.

The diff at the end of this seems to fix things for me, but of course I
wanted to run it by the master o' blast first before committing. If you
can't reproduce the parsing problem, please let me know and I'll send a
script that demonstrates it. 

Yours in blasting,
Brad

*** NCBIWWW.py.orig	Sat Aug 12 16:23:24 2000
--- NCBIWWW.py	Tue Oct 10 21:15:06 2000
***************
*** 148,153 ****
--- 148,156 ----
	  # Read the RID line, for version 2.0.12 (2.0.11?) and above.
	  attempt_read_and_call(uhandle, consumer.noevent, start='RID')
  
+	  # 2.1.1 seems to have another <p> here
+	  attempt_read_and_call(uhandle, consumer.noevent, start='<p>')
+ 
	  # Read the Query lines and the following blank line.
	  read_and_call(uhandle, consumer.query_info, contains='Query=')
	  read_and_call_until(uhandle, consumer.query_info, blank=1)
***************
*** 204,211 ****
	  read_and_call(uhandle, consumer.noevent, blank=1)
  
	  # Read the descriptions and the following blank line.
!	  read_and_call_until(uhandle, consumer.description, blank=1)
!	  read_and_call_while(uhandle, consumer.noevent, blank=1)
  
	  consumer.end_descriptions()
  
--- 207,214 ----
	  read_and_call(uhandle, consumer.noevent, blank=1)
  
	  # Read the descriptions and the following blank line.
!	  read_and_call_until(uhandle, consumer.description, contains =
'</PRE>)
!	  read_and_call_while(uhandle, consumer.noevent, contains =
'</PRE>')
  
	  consumer.end_descriptions()



More information about the Biopython-dev mailing list