Nazdar, trapim sa s jednym problemom-vzdy mi vyhadzuje chybu, ked chcem retazec so slovenčinou/češtinou, ktory ziskam so vstupu, ulozit do subora :/
# -*- coding: utf-8 -*-
from Tkinter import *
root=Tk()
text=Text(root)
text.pack()
def stlac():
a=text.get(1.0, END)
subor=file("text.txt","w")
subor.write(a)
subor.close()
Button(root,command=stlac, text="ok").pack()
root.mainloop()
Vyhodi mi to
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 0: ordinal not in range(128)