Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Angle
#1
Hi guys i would like to know how do i change angle of thhings i programed on mac? Becouse when im on windows computer i just type angle but that doesnt work for me on mac. Do i just need to install some aditional packegers or shat should i do?
Reply
#2
What do you mean by 'angle'? What exactly are you trying to do?
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
Like if i wanr to change the direction of my text. When Dont want my text to be vertical and horizontal.
Reply
#4
What has that got to do with Python?
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#5
We were doing it in class but im the only one using mac
Reply
#6
Doing what in class? Are you trying to run Python code? If so what is the code, what version of Python are you using in school? On the Mac? What errors are you encountering?
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#7
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"
Reply
#8
(Oct-30-2017, 11:23 AM)kripso Wrote: _tkinter.TclError: unknown option "-angle"

Leads me to believe you do not have Tcl version 8.6 (when "angle" was introduced". You can check from the command prompt which version you have:

>>> import tkinter
>>> tkinter.TclVersion
8.6
>>>
Which version of Python are you using on the Mac?
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#9
8.5 i downloaded the latest version on python website in september. how should i update it then?
Reply
#10
Since you didn't say which version of Python you are using, you can try pip3 install --upgrade tkinter from the command prompt.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to map 360 degree angle over 1024 counts breadcat248 3 2,519 May-17-2019, 07:13 AM
Last Post: breadcat248
  Converting Angle to X and Y Values: 90/180/270 deg qrani 1 2,779 Nov-21-2018, 06:41 PM
Last Post: woooee
  finding angle between three points on a 2d graph qrani 4 14,111 Nov-20-2018, 06:10 AM
Last Post: Gribouillis
  How to find the cosine of an angle sylas 6 5,229 May-25-2017, 04:29 PM
Last Post: sylas

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020