Tkinter and Button command

dijkhuis a.dijkstra03 at kpn.com
Thu Sep 13 08:48:53 EDT 2001


I don't know why, but it works now:

from Tkinter import *
from os import getcwd, mkdir, chdir

# Definition Fonction
def CrRepDdb():
    #Cree l'ensemble des repertoires utiles avec Bdd
    mypa=getcwd()
    a=zon.get()
    sla="\\"+a
    mypath=mypa+sla
    mkdir(mypath)
    chdir(mypath)
    mkdir("Source")
    mkdir("Website")
    mkdir("Bdd")
    mkdir("SuiviProd")
    mkdir("ClientCode")


# Creation du root ...
root=Tk()

lab2=Label(root,text="Veuillez entrer le nom du projet :")
lab2.pack()

# La zone de texte ...
zon=Entry(root,bg="azure1",fg="dark red",relief="groove")
zon.pack()
zon.insert(INSERT,"test")


mybut=Button(root,text="create",command=CrRepDdb)
mybut.pack()

root.mainloop()

Arjen

Golem <dvaken at hotmail.com> schreef in artikel <9nq1ff$kjh$1 at wanadoo.fr>...
> Hi
> Here's my problem :
> I've made a form with a entry and a button
> The user type a name in the entry and validate with the button
> The button call a function wich create a list of directorie with the name
> entered in the entry :
> 





More information about the Python-list mailing list