how to make google in python

Solutions on MaxInterview for how to make google in python by the best coders in the world

showing results for - "how to make google in python"
Jacopo
30 Mar 2020
1import tkinter as tk
2import tkinter.font as font
3import webbrowser
4
5root = tk.Tk()
6root.title("google alt")
7
8
9
10def search():
11  query = "https://www.google.com/search?q="+entry.get().replace(" ","+")
12  webbrowser.open(query)
13
14# Fonts
15logoFont = font.Font(family="Arial", size="30")
16
17# Header
18title = tk.Label(text="Google", font=logoFont).pack()
19btn1 = tk.Label(text="\nGoogle Search...").pack()
20
21# Searchbox
22entry = tk.Entry(root)
23entry.pack()
24
25btn = tk.Button(root, text="search google", command=search)
26btn.pack()
27
28root.mainloop()