I think bs = BeautifulSoup.BeautifulSoup( oFile) but I don't understand what you are doing...<br>
(I never used BeautifulSoup...)<br>
<br>
Maybe It is somthing like:<br>
<br>
import itertools<br>
for incident in itertools.chain(bs('tr', {'bgcolor' : '#eeeeee'}), bs('tr', {'bgcolor' : 'white'})):<br>
do_something()<br><br>
Look at some examples on the web or ask a precise question (what is your problem exactly?):<br>
<a href="http://www.petersblog.org/taxonomy/term/2">http://www.petersblog.org/taxonomy/term/2</a><br>
<a href="http://crummy.com/software/BeautifulSoup/documentation.html">http://crummy.com/software/BeautifulSoup/documentation.html</a><br>
... <br>
<br>
Cyril<br>
<br><div><span class="gmail_quote">On 11 Aug 2005 11:56:49 -0700, <b class="gmail_sendername">yaffa</b> <<a href="mailto:yxxxxlxxxxx@gmail.com">yxxxxlxxxxx@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
dear python gurus,<br><br>quick question on syntax.<br><br>i have a line of code like this<br><br>for incident in bs('tr', {'bgcolor' : '#eeeeee'}):<br><br><br>what i want it to do is look for 'bgcolor' : '#eeeeee' or 'bgcolor' :
<br>'white' and then do a whole bunch of stuff.<br><br>i've tried this:<br><br>for incident in bs('tr', {'bgcolor' : '#eeeeee'} or {'bgcolor' :<br>'white'} ): but it only seems to pick up the stuff from the<br>{'bgcolor' : '#eeeeee'}
<br><br><br>any ideas folks?<br><br>thanks<br><br>yaffa<br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>