lundi 26 octobre 2015

python opening web site in the same window (web browser)

I am trying to create a gui mode window with python to open a URL in the same window ie an application in python for windows OS, Example below tried this but it creates a button with a link and I not find anything about it on the web.

#simple GUI

from tkinter import *
import tkinter.messagebox
import webbrowser

app = Tk()
app.title("Gui Example")
app.geometry("450x300+200+200")
new = 2

url = "http://ift.tt/1NvGZNX"

def Link():
    webbrowser.open(url,new-new)

button = Button(app, text= "conectando" , command = Link)
button.pack()
app.mainloop()




Aucun commentaire:

Enregistrer un commentaire