I have an idea to create a Parental Supervision Web Browser. The way
it works is that I create a desktop application in python(preferably
using wxPython or wxPythons webkit) thats just a widget that can
display HTML & CSS.
HTTP requests for a website will go through a proxy on my server. So
if someone wants to access the website "http://google.com":
- they type in that url in the python browser
- the request goes to my script on my server: http://mywebserver.com/cgi-bin/browserRequest.py?url=http://google.com
- The python script checks the url against a list of invalid urls; if
it passes then the script downloads/accesses the webpage & sends back
the HTML & where relevant external css or javascript files
**My Question: What python GUI libraries have simple easy to use
widgets that display HTML AND can display CSS?**
I am finding that most HTML widgets cant display CSS especially in
wxpython. Plus some widgets dont allow your html to have html or body
tag elements. Do you know of the best widget either in wxpython or in
any python based GUI that can show HTML & CSS?
My code attempting to use a WebKit control wont compile saying
"AttributeError: 'module' object has no attribute 'webkit'"
import wx
class ApplicationFrame( wx.Frame ):
# Class Variables:
# self.browser_wnd ~ BrowserWindow
# self.brower_tabs ~ List of BrowserWindow
Currently you can use wx.lib.iewin on Windows and wx.webkit on Mac out of the box. The new wxWebKit project should have installable binaries coming soon, or you can build it yourself if you have the tools and are feeling adventurous. Also coming soon in the wx 2.9 series is a new set of C++ classes from a GSoC project that wrap webkit on mac and gtk and IE on Windows. I've been focusing on Project Phoenix lately so I haven't attempted wrappers for wxPython Classic for these classes yet so I don't have a feel for how they compare to the other options.
···
On 10/20/11 9:12 PM, Sascha wrote:
Hello
I have an idea to create a Parental Supervision Web Browser. The way
it works is that I create a desktop application in python(preferably
using wxPython or wxPythons webkit) thats just a widget that can
display HTML& CSS.
HTTP requests for a website will go through a proxy on my server. So
if someone wants to access the website "http://google.com":
- they type in that url in the python browser
- the request goes to my script on my server: http://mywebserver.com/cgi-bin/browserRequest.py?url=http://google.com
- The python script checks the url against a list of invalid urls; if
it passes then the script downloads/accesses the webpage& sends back
the HTML& where relevant external css or javascript files
**My Question: What python GUI libraries have simple easy to use
widgets that display HTML AND can display CSS?**
I am finding that most HTML widgets cant display CSS especially in
wxpython. Plus some widgets dont allow your html to have html or body
tag elements. Do you know of the best widget either in wxpython or in
any python based GUI that can show HTML& CSS?
My code attempting to use a WebKit control wont compile saying
"AttributeError: 'module' object has no attribute 'webkit'"
I have an idea to create a Parental Supervision Web Browser. The way
it works is that I create a desktop application in python(preferably
using wxPython or wxPythons webkit) thats just a widget that can
display HTML & CSS.
HTTP requests for a website will go through a proxy on my server. So
if someone wants to access the website "http://google.com":
- they type in that url in the python browser
- the request goes to my script on my server: http://mywebserver.com/cgi-bin/browserRequest.py?url=http://google.com
- The python script checks the url against a list of invalid urls; if
it passes then the script downloads/accesses the webpage & sends back
the HTML & where relevant external css or javascript files
**My Question: What python GUI libraries have simple easy to use
widgets that display HTML AND can display CSS?**
I think you dramatically underestimate the effort involved here. You
not only have to worry about HTML and CSS, but Javascript. You cannot,
in practical terms, provide a good browsing experience today without
Javascript.
What you are describing is nothing more than a local proxy. Those are
very easy to implement. They sit in the background, without a UI. All
of the modern browsers will go look for a proxy, and then all web
requests pass through the proxy. You can send the request to your
checker, and if approved forward it on to the original requester. There
are even web proxies in Python for you start from. There's one that
enables web debugging, by displaying all requests that go out and all
response that come back.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.