954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need help trying to open a web page in python

I'm using windows 7, hoping to use Tkinter to open an internet window when a button is clicked that goes to a specific page in google chrome. Is this possible?

class App:
    def __init__(self, master):

        frame = Frame(master)
        frame.pack()

        self.button = Button(frame, text="Rejuvenation", command=self.info)
        self.button.pack()
    def info(self):
        pass #Will go to relevant webpage
chris99
Junior Poster
118 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

Check webbrowser module.

pyTony
pyMod
Moderator
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852
 

like pyTony said you want to use the webbrowser module. where pass is in your could it would look something like this

#after you have imported webbrower
webbrowser.open('address to site goes here')
inuasha
Newbie Poster
22 posts since Dec 2011
Reputation Points: 10
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: