Oppure

Loading
27/02/10 14:12
puffetta92
potete Inserire una label di testo che permetta all'utente di scegliere cosa scrivere sul file
e a parte
far modificare all'utente il testo del file?


from Tkinter import*
class Prova:
def __init__(self, master):
frame=Frame(master)
frame.pack()

self.prova=Button(frame, text="SAVE", fg="blue", command=self.Scrivi)
self.prova.pack(side=LEFT)

self.test=Button(frame, text="SHOW", fg="red", command=self.Show)
self.test.pack(side=RIGHT)

def Scrivi(self):
s=open('ciao.txt', 'w')
s.write("CIAOOOO";)
s.close()

def Show(self):
s=open('ciao.txt', 'r')
file=s.readlines()
print file

root=Tk()
app=Prova(root)
root.mainloop()

aaa
27/02/10 20:25
lorenzo
è una battuta, vero?:-|
aaa