HTML stylesheet expander?

Roger Binns rogerb at rogerbinns.com
Wed Nov 24 10:53:28 EST 2004


"Duncan Booth" <duncan.booth at invalid.invalid> wrote in message news:Xns95AB5E981A615duncanrcpcouk at 127.0.0.1...
> to simple cases I would suggest you might be best loading the HTML into a
> browser and manipulating it there to find out what styles everything has.

This is in a program that runs on Windows, Linux and Mac and I am
generating the HTML, and supply the stylesheet.

> If you are using Windows then there is no problem: just drive IE remotely
> through COM and use Python to iterate over the document and pick out the
> runtime style attributes that you are interested in.

My problem is that I want to display the HTML in the HTML widget
supplied with wxPython (which doesn't understand styles).  If I
could use a different widget then that is fine, but at the moment
there are no alternatives (short of me spending many months of
working porting something to wxWidgets).

> If you are not using Windows, or you want portability, then you are
> probably best doing this in Javascript.

How exactly would I do that?  There is no Javascript in Python and if
I had a way of displaying HTML then this is a non-issue.

Have a look at this screenshot:  http://bitpim.org/screenshots/phonebook.jpg

The green backgrounded pane on the right is the wxPython HTML widget and
I use my current hacky scheme to apply styles for the various areas.

Roger 





More information about the Python-list mailing list