Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # An academic search application written by Umut Bilgic..
- # Version 1.0
- import webbrowser
- import sys
- from tkinter import *
- from tkinter.ttk import *
- master = Tk()
- search_var = IntVar()
- def button_search_command():
- webbrowser.open("http://scholar.google.com.tr/scholar?hl=tr&q="+entry_search.get())
- webbrowser.open("www.ncbi.nlm.nih.gov/pubmed/?term="+entry_search.get())
- if search_var == 1:
- webbrowser.open("www.google.com/search?q="+entry_search.get())
- else:
- pass
- def button_clear_command():
- entry_search.delete(0, END)
- def button_quit_command():
- sys.exit("User hit 'Quit' button. ")
- button_search = Button(master, text="Search", command = button_search_command)
- button_search.grid(row = 0, column = 0)
- button_clear = Button(master, text="Clear", command = button_clear_command)
- button_clear.grid(row = 1, column = 0)
- button_quit = Button(master, text="Quit", command = button_quit_command)
- button_quit.grid(row = 1, column = 1)
- entry_search = Entry(master)
- entry_search.grid(row = 0, column = 1)
- checkbox_google = Checkbutton(master, text="Search Google", variable = search_var)
- checkbox_google.grid(row = 2, column = 0)
- master.title("Search Tool")
- mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement