Re: why the conut( ) can not get the number?

2012-12-10 Thread Peter Otten
水静流深 wrote: > i wnat to get the number of a atrributes in a xpath,here is my code,why i > can not get the number ? import urllib > import lxml.html > down="http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html"; > file=urllib.urlopen(down).read() > root=lxml.html.document_fromstring(f

why the conut( ) can not get the number?

2012-12-10 Thread ????????
i wnat to get the number of a atrributes in a xpath,here is my code,why i can not get the number ? import urllib import lxml.html down="http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html"; file=urllib.urlopen(down).read() root=lxml.html.document_fromstring(file) for order,node i