LinuxCNC: How to find current position using Python
This will show the position in machine coordinates such as
#!/usr/bin/env python2.7
import linuxcnc
stat = linuxcnc.stat()
stat.poll()
print(stat.actual_position)
Example output:
(7.4023762662053105, 26.443582149595567, 297.289833343029, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)