problems with wx.html.htmlwindow / wxMozilla

or is there a nother way to do it?

for example display the information in a nother way and open a hidden

browser to print the html file.

What OS? I only support Windows and Mac, so I do:

        if sys.platform == "darwin":
            from wx import webkit

            self._view = webkit.WebKitCtrl(self, -1)
            self._view.PageSource = html
        elif sys.platform == "win32":
            from wx.lib import iewin

            self._view = iewin.IEHtmlWindow(self, -1)
            self._view.LoadString(html)

        # ... later
        self._view.Print(True)

If you need to support Linux too I don’t know of a solution, sorry :frowning: Rumor has it one day we’ll get a cross-platform wxWebkit in wxPython, which would be just about the most awesome thing ever done. There’s soooooo much that would help with :slight_smile:

–S

Stephen Hansen wrote:

What OS? I only support Windows and Mac, so I do:

            if sys.platform == "darwin":
                from wx import webkit

                self._view = webkit.WebKitCtrl(self, -1)
                self._view.PageSource = html
            elif sys.platform == "win32":
                from wx.lib import iewin

                self._view = iewin.IEHtmlWindow(self, -1)
                self._view.LoadString(html)

            # ... later
            self._view.Print(True)

I do something similar, but with small wrapper that hides the differences.

If you need to support Linux too

I think wxMozilla is it -- though it has a reputation for being a pain.

Rumor has it one day we'll get a cross-platform wxWebkit in wxPython,

It might be worth taking a look at it -- if your needs are simple (i.e. no frames or printing), it may work for you, though you also may need to build it yourself. A year or so ago there were some Windows binaries you could try. I understand it's made good progress recently.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Rumor has it one day we’ll get a cross-platform wxWebkit in wxPython,

It might be worth taking a look at it – if your needs are simple (i.e. no frames or printing), it may work for you, though you also may need to build it yourself. A year or so ago there were some Windows binaries you could try. I understand it’s made good progress recently.

My needs are relatively simple. I might give it a try. The last time I tried to build wxPython universal on Mac by myself, I totally failed. I don’t remember why, but it went terribly terribly wrong :slight_smile: As for windows! … I’ll cross that bridge when I conquer the mac side first :slight_smile:

–S