how can i use lxml with win32com?

Michiel Overtoom motoom at xs4all.nl
Sun Oct 25 09:30:51 EDT 2009


elca wrote:

> im sorry ,also im not familiar with newsgroup.

It's not a newsgroup, but a mailing list. And if you're new to a certain 
community you're not familiar with, it's best to lurk a few days to see 
how it is used.


> so this position is bottom-posting position? 

It is, but you should also cut away any quoted text that is not directly 
related to the answer.
Otherwise people have to scroll many screens full of text before they 
can see the answer.


 > how can i keep open only one windows? not open several windows.

The trick is to not instantiate multiple PAMIE objects, but only once, 
and reuse that.
Like:

import time
import PAM30
ie=PAM30.PAMIE( )

ie.navigate("http://www.cnn.com")
text1=ie.getPageText()

ie.navigate("http://www.nu.nl")
text2=ie.getPageText()

ie.quit()
print len(text1), len(text2)


But still I think it's unnecessary to use Internet Explorer to get 
simple web pages.
The standard library "urllib2.urlopen()" works just as well, and doesn't 
rely on Internet Explorer to be present.

Greetings,


-- 
"The ability of the OSS process to collect and harness
the collective IQ of thousands of individuals across
the Internet is simply amazing." - Vinod Valloppillil
http://www.catb.org/~esr/halloween/halloween4.html



More information about the Python-list mailing list