Webbrowser written totally in Python

  • Thread starter Franz Steinhaeusler
  • Start date
F

Franz Steinhaeusler

Hello NG,

is there any (GUI) webbrowser written completly in Python?

in pyGtk, pyQt, wxPython or TkInter?
 
F

faulkner

this was just on digg:
######################
import wx
from urllib import urlopen
import wx.html

class Frame(wx.Frame):

def userPageButton(self, event):
goToPage=self.userPage.GetValue()
goToPage='http://www.' + goToPage
webpage=urlopen(goToPage).read()
displayPage=self.html.SetPage(webpage)

def __init__(self):
wx.Frame.__init__(self, parent=None, id=-1, title='microBrowser',
size=(800, 600), pos=(50, 50))
panel=wx.Panel(self)
self.userPage=wx.TextCtrl(panel, pos=(400, 5)) #
self.html = wx.html.HtmlWindow(panel, id=-1, size=(780, 530),
pos=(10, 35), style=wx.html.HW_SCROLLBAR_AUTO)
userPageButton=wx.Button(panel, label='Go!', pos=(300, 5))
userPageButton.Bind(wx.EVT_BUTTON, self.userPageButton)

class App(wx.App):

def OnInit(self):
self.frame=Frame()
self.frame.Show()
self.SetTopWindow(self.frame)
return True

if __name__=='__main__':
app=App()
app.MainLoop()

#################
there are also python bindings for gtkmozembed in gnome-python-extras
and here:
http://sourceforge.net/projects/pygtkmoz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top