pages. from Tkinter import *
import webbrowser
#My first OptionMenu widget written in Python 2.6
def OpenWeb():
showWeb=theAction.get()
if showWeb=='My blog':
webbrowser.open('http://stevespythonprogramadventures.blogspot.com/')
if showWeb=='open SNCO':
webbrowser.open('http://www.snco.us/default.asp')
if showWeb=='GISviewer':
webbrowser.open('http://gis.snco.us/PublicGIS/')
root=Tk()
theAction=StringVar()
theAction.set(None)
OptionMenu(root,theAction,'My blog','open SNCO','GISviewer').pack()
abtn=Button(root, text='go!',command=OpenWeb)
abtn.pack()
root.mainloop()
No comments:
Post a Comment