if filepath
is the absolute pathname of the file you got from the opendialog, try:
import os
os.startfile(filepath)
This will open your file with its corresponding windows application to which its extension is associated (like clicking twice in the file icon)
To copy a selected text in the HTML window, if you used:
import wx.lib.iewin as iewin
then in your Frame or Panel subclass you create your instance of the browser object in the __init__()
method with:
self.ie = iewin.IEHtmlWindow(self, -1, style =wx.NO_FULL_REPAINT_ON_RESIZE)
and bind the copy button onclick event with an 'on_copy' method.
Finally, you define the on_copy(self, event) method that should be triggered when you click the 'copy' button:
def on_copy(self, event):
self.selection = self.ie.GetStringSelection(asHTML=False)