Opening webPages on a HtmlWindow.

Hi all!
  Does anynone has a idea how open a html page in a HtmlWindow, from http:// ???
  I have made one class extending HtmlWindow and made it like this:

  class MyHTML(HtmlWindow):
  #Init codes(nothing but call the HtmlWindow constructor)
      def OnLinkClicked(self,url):
          ret=urlopen(self.URL+url.GetHref())
          self.SetPage(ret.read())
          return(1)
    
   It opens any link i click, but does not opens images and other things i need.
   I tried to extends OnOpeningUrl(self,type,url,redirect) , but don't know how(i only got segfault on python interpreter)

···

--

Rodrigo wrote:

  Hi all!
  Does anynone has a idea how open a html page in a HtmlWindow, from http:// ???
  I have made one class extending HtmlWindow and made it like this:

  class MyHTML(HtmlWindow):
  #Init codes(nothing but call the HtmlWindow constructor)
      def OnLinkClicked(self,url):
          ret=urlopen(self.URL+url.GetHref())
          self.SetPage(ret.read())
          return(1)
       It opens any link i click, but does not opens images and other things i need.
   I tried to extends OnOpeningUrl(self,type,url,redirect) , but don't know how(i only got segfault on python interpreter)

Use self.LoadPage(url) and let wxHtmlWindow load the data itself. When it knows the base location then it is also able to load the relative links to images and etc.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!