[ACCEPTED]-Light-weight renderer HTML with CSS in Python-browser
Accepted answer
You should use a UI framework:
- Qt: The simplest class to use would be QWebView
- Gtk: pywebkitgtk would be the best answer, but you can find others in the PyGTK page.
- In Tk is the TkHtml widget from here
An other option 10 is to open the OS default web browser through 9 something like this:
import webbrowser
url = 'http://www.python.org'
# Open URL in a new tab, if a browser window is already open.
webbrowser.open_new_tab(url + '/doc')
# Open URL in new window, raising the window if possible.
webbrowser.open_new(url)
You can find more info 8 about the webbrowser module here. I think that 7 the simplest way would be to use the os 6 browser if you are looking for something 5 very light-weight since it does not depend 4 on a framework and it would work in all 3 platforms. Using Tk may be an other option 2 that is light and will not require to install 1 a 3rd party framework.
Flying Saucer Project -- an XHTML renderer.
No, it's not Python. It's 1 -- however -- trivially called from Python.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.