Alle Funktionen werden beim start automatsch ausgeführt
Verfasst: Samstag 2. Mai 2015, 13:26
Bei mir werden alle funktionen am anfang einal ausgeführt.
Ich will das eigenlich nicht so.
weiß jemand wieso das so sein könnte?
Danke schonmal im vorraus! 
Ich will das eigenlich nicht so.
weiß jemand wieso das so sein könnte?
Code: Alles auswählen
from tkinter import *
import os
import os
def playmt():
os.system("minetest")
playmt()
import os
def mtflogin():
os.system("firefox -a firefox -remote 'openURL(https://forum.minetest.net/ucp.php?mode=login&sid=a5412d08939e182ad1afd4a2b7cbe4a4, new-tab)' > /dev/null & p1=$!")
mtflogin()
window = Tk()
window.geometry("700x600")
window.title("Minetest Launcher")
window.configure(background='grey')
updatebutton = Button(window, text="update", command=update)
updatebutton.place(x=40, y=50)
helpbutton = Button(window, text="help", command=mtflogin)
helpbutton.place(x=110, y=50)
playbutton = Button(window, text="play", command=playmt)
playbutton["background"] = "lightgreen"
playbutton.config(font=('Junkyard', 30))
playbutton.place(x=600, y=50)