views:

183

answers:

1

Is there an opensource library/package available that we could use to parse an xHTML/css file into wxPython layout instructions (inside a larger python program)? For the Pythics project, we need a better parser than the one written by our primary programmer, but his attempts to improve it are both making things better (stops ignoring CSS) and worse (no longer recognizes div tags), and it might be easier if we could just find a pre-built interpreter and integrate that.

+1  A: 

I am not clear how exactly you use HTML to generate wxpython UI, but may be you should think of alternate strategy of embedding a HTML browser( e.g. webkit http://wxwebkit.wxcommunity.com/) into your application and interact with it using javascript.

Otherwise you can use see html parser code of webkit to generate wxpython ui.

Anurag Uniyal
We can't have people installing CYGWIN as a general rule, so we can't use that. It needs to be able to run on standard windows with minimal added packages (currently Matplotlib, wxPython, numpy, and pyvisa are the only added dependencies).
Elliot
@Elliot, but that would be needed for developers only, why that should be constraint for developers?
Anurag Uniyal