def __init__(self, parent, htpath): """Panel to contain webkit ctrl""" wx.Panel.__init__(self, parent) self.html_preview = WKHtmlWindow(self) self.html_preview.PizzaMagic() url = "file:" + urlFromPathname(htpath) self.html_preview.LoadUrl(url)
def encodeSelection(editor): text = editor.GetSelectedText() url = urlFromPathname(text) editor.ReplaceSelection("file:%s" % url)