I am making an os in python, but I need a web browser. Currently I am using the os.startfile method to launch chrome, but I want another way. I want a program that a user can enter a webpage and displaying the web page without using chrome, firefox, safari etc.
Here is the basic framework I have:
from tkinter import *
import webbrowser as wb
window = Tk()
window.configure(bg="Dark Red")
window.geometry("1000x1000")
window.title("Hyper Web Browser")
window.iconbitmap("icon.ico")
''' Defined Functions'''
def submit_url():
wb.open_new_tab(Address_Bar.get())
file2write = open("History.txt", "a")
file2write.write(["\n", Address_Bar.get()])
return submit_url
'''Objects'''
Address_Bar = Entry(
bg="White",
bd=0,
font=("Comic", 25),
width=100
)
Tab_1 = Label(
bg="Red",
bd=0,
width=20,
height=3
)
Return = Button(
command=submit_url()
)
Address_Bar.place(x=20, y=60)
Tab_1.place(x=0, y=0)
Return.pack()
window.mainloop()
However, this program launches the web page into the user's default browser. Hence, I want to display the web page without using any other web browsers.