This dist is generated by Vue
import os
import wx
import wx.html2
class MyBrowser(wx.Frame):
def __init__(self, *args, **kwds):
wx.Frame.__init__(self, *args, **kwds)
web_path = os.path.join(os.getcwd(), 'static', 'dist', 'index.html')
self.url = f"file:///{web_path}"
self.browser = wx.html2.WebView.New(self)
self.browser.LoadURL(self.url)
def on_open(self, event):
self.browser.LoadURL(self.url)
if __name__ == '__main__':
app = wx.App(False)
frame = MyBrowser(None, wx.ID_ANY, "My Local Web App")
frame.Show()
app.MainLoop()
I had to do this because I was trying to mimic tauri wry's way of loading index.html