close a window and continue execution in the other one?????

Post here if you need help with creating a Graphical User Interface in Python.

close a window and continue execution in the other one?????

Postby MaRie » Wed Nov 20, 2013 3:10 pm

I'm really lost...I open a window with two buttons, and when you click on the button called "REGISTER SOME KEY PRESSES" it runs the script called, BUUUUT once finished I want to close that execution but keep the first window's being impossible for me....

Please, i would reaaaally appreciate any help... :roll:

Code: Select all

#!/usr/bin/env python
from Tkinter import *
import threading

v0 = Tk()

def finishApplication(): v0.destroy()
def registerSomeKeyPresses():
    t = threading.Thread(target=execfile(""))


def waitAndRun(f): v0.after(200, f)

b1=Button(v0,text="TERMINAR APLICACION",command=lambda: finishApplication()).pack()

button_keyPresses=Button(v0,text="REGISTER SOME KEY PRESSES",command=lambda: waitAndRun(registerSomeKeyPresses())).pack()


================ ===========================
Code: Select all

Do several things and last command:


Last edited by stranac on Wed Nov 20, 2013 3:50 pm, edited 1 time in total.
Reason: First post lock.
Posts: 1
Joined: Wed Nov 20, 2013 2:29 pm

Return to GUI

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests