[python-win32] Python-win32 Digest, Vol 53, Issue 3
Huang Guan
crown.hg at gmail.com
Fri Aug 3 16:33:44 CEST 2007
Dear Roger,
Thanks for your comments, according the code suggestion you gave:
ie.Navigate('about:blank')
p=ie.Document._oleobj_.QueryInterface(pythoncom.IID_IPersistStreamInit)
p.Load(<PyIStream that contains content>),
confirm Load() metchod in existence.
Could you give some examples on how to use PyISteream for my
reference? It's very difficult to find use paradigm in pywin32.chm.
1.) How can we use p.Save(<PyIStream that contains con tent>) method,
save html source and html header into a string variant?
2.) same as part 1,how to use a string variant £¨string=html
source£©,load into ie.Document control?
3) If execute p.Save (), and p.Load () successfully, as initialize
ie.Document control with ie.Navigate ( 'about : blank') before, will
the IE original URL address bar become "about : blank"? I want to keep
the original IE address bar URL unchanged. Is it possible?
Would you pls show me some example, roger?
Anxiously awaiting your further comments.
Thanks & best regards!
Crown.hg
2007/8/2, python-win32-request at python.org <python-win32-request at python.org>:
>
> Send Python-win32 mailing list submissions to
> python-win32 at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.python.org/mailman/listinfo/python-win32
> or, via email, send a message with subject or body 'help' to
> python-win32-request at python.org
>
> You can reach the person managing the list at
> python-win32-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Python-win32 digest..."
>
>
> Today's Topics:
>
> 1. Fwd: pywin32 bugs feedback from learner (Roger Upole)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 2 Aug 2007 04:37:34 -0400
> From: "Roger Upole" <rwupole at msn.com>
> Subject: [python-win32] Fwd: pywin32 bugs feedback from learner
> To: <python-win32 at python.org>
> Message-ID: <002501c7d4e0$624154c0$0100a8c0 at rupole>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Huang Guan wrote:
> > Thank you very much for your quick response.
> > As brief view of PAMIE source code, PAMIE realization is a very special
> ideas.
> > But it can only be used by Dispatch approaches, it does not use the
> > method DispatchWithEvents;
> > I can't load "Loading HTML content from a Stream" function.
> > Pls see the functional description:
> > http://msdn2.microsoft.com/en-us/library/aa752047.aspx.
>
>
> import win32com.client, pythoncom
> class IE_Events:
> def OnNavigateComplete2(self, pDisp, URL):
> print 'OnNavigateComplete2:', URL
>
> ie=win32com.client.DispatchWithEvents('internetexplorer.application',
> IE_Events)
> ie.Visible=1
> ie.Navigate('about:blank')
> p=ie.Document._oleobj_.QueryInterface(pythoncom.IID_IPersistStreamInit)
> p.Load(<PyIStream that contains content>)
>
> Roger
>
>
>
> ------------------------------
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
>
> End of Python-win32 Digest, Vol 53, Issue 3
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070803/cd0ab9f3/attachment.htm
More information about the python-win32
mailing list