import tkinter
canvas = tkinter.Canvas(bg='white', width=800, height=600)
canvas.pack()
def ciara(e):
x = e.x
y = e.y
canvas.create_line(400,300,x,y, width=3, fill='lime green')
def smajlik(e):
x = e.x
y = e.y
canvas.create_oval(x-20,y-20,x+20,y+20, fill='yellow')
canvas.create_oval(x-15,y-15,x-10,y-10)
canvas.create_oval(x+15,y-15,x+10,y-10)
canvas.create_text(x,y, text='(',angle=90)
canvas.bind('<Button-1>', ciara)
canvas.bind('<Button-2>', smajlik)
canvas.mainloop()
this is the program we were doing and i don't know why but when they were running it on windows computers it worked but not on mac. the error says- ->
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 1699, in __call__
return self.func(*args)
File "/Users/macbook/Documents/pogramovanie/moje/09_udalosti_mysi - trava.py", line 18, in smajlik
canvas.create_text(x,y, text='(',angle=90)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 2498, in create_text
return self._create('text', args, kw)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 2474, in _create
*(args + self._options(cnf, kw))))
_tkinter.TclError: unknown option "-angle"