Hello list !! I'm developing a Python GUI application. I alreday developed a very simple window with buttons, each button will do a different task, but the most important button will need to get information gotten in previous python's functions. Let's say I have four functions but at the end I want to collet all the information gotten. from Tkinter import * import tkSimpleDialog import tkMessageBox import tkFileDialog def directorio(): print 'Seleccione directorio donde empezar' dirname = tkFileDialog.askdirectory(parent=root,initialdir="/",title='Selecciona la ruta a escanear') if len(dirname ) > 0: print "You chose %s" % dirname def extension(): print "Escribe la extension que necesitas buscar" ext=tkSimpleDialog.askstring('Extension a buscar:','') print 'Buscando archivos: ',ext def csv(): print "Nombre del csv a crear" inv=tkSimpleDialog.askstring('Nombre de .csv:','') print 'Archivo de salida: ',inv def boton4(): #In this button I want to make a bigger process, but I need the root selected and the two strings the user types. print csv.inv #Obviously this throws an error root = Tk() top = Toplevel() root.minsize(400,200) toolbar = Frame(root) b = Button(toolbar, text="Selecciona ruta", width=15, command=directorio) b.pack(side=LEFT, padx=2, pady=2) b = Button(toolbar, text="Escriba extension", width=15, command=extension) b.pack(side=LEFT, padx=2, pady=2) b = Button(toolbar, text="Nombre de csv", width=15, command=csv) b.pack(side=LEFT, padx=2, pady=2) b = Button(toolbar, text="Salir", width=6, command=boton4) b.pack(side=LEFT, padx=2, pady=2) toolbar.pack(side=TOP, fill=X)
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor