- Posts: 1110
- Thank you received: 7
Python stat toolinfo
2 years 2 weeks ago #311820
by JT
Python stat toolinfo was created by JT
Following the directions in the docs for toolinfotoolinfo(toolno)(returns dict of tooldata for toolno) - An initial stat.poll() is required to initialize. toolno must be greater than zero and less than or equal to the highest tool number in use. Dictionary items include all tooldata items: toolno, pocketno, diameter,frontangle,backangle,orientation, xoffset,yoffset, … woffset, comment#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import linuxcnc
s = linuxcnc.stat()
s.poll()
toolno = 1
print(s.toolinfo(toolno))
>>> s.poll()
>>> toolno = 1
>>> print(s.toolinfo(toolno))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'linuxcnc.stat' object has no attribute 'toolinfo'
I'm running 2.9.2-64-abunchofletters
Anyone know when this was added?
JT
# -*- coding: utf-8 -*-
import linuxcnc
s = linuxcnc.stat()
s.poll()
toolno = 1
print(s.toolinfo(toolno))
>>> s.poll()
>>> toolno = 1
>>> print(s.toolinfo(toolno))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'linuxcnc.stat' object has no attribute 'toolinfo'
I'm running 2.9.2-64-abunchofletters
Anyone know when this was added?
JT
Please Log in to join the conversation.
2 years 2 weeks ago #311821
by JT
Replied by JT on topic Python stat toolinfo
Looks like it is only in master so having it in the 2.9 docs is an error.
JT
JT
Please Log in to join the conversation.
2 years 2 weeks ago #311825
by Aciera
Replied by Aciera on topic Python stat toolinfo
Looking at the python module documentation in the 2.9 source:
github.com/LinuxCNC/linuxcnc/blob/2.9/do...ython-interface.adoc
it seems that these sites are showing the documentation for master instead of 2.9:
linuxcnc.org/docs/stable/html/config/python-interface.html
linuxcnc.org/docs/2.9/html/config/python-interface.html
[edit]
I'll file this as an issue on github
github.com/LinuxCNC/linuxcnc/issues/3149
github.com/LinuxCNC/linuxcnc/blob/2.9/do...ython-interface.adoc
it seems that these sites are showing the documentation for master instead of 2.9:
linuxcnc.org/docs/stable/html/config/python-interface.html
linuxcnc.org/docs/2.9/html/config/python-interface.html
[edit]
I'll file this as an issue on github
github.com/LinuxCNC/linuxcnc/issues/3149
Please Log in to join the conversation.
Time to create page: 0.880 seconds
