linuxcnc/nc_files/filtertest.py
Chris Morley 8d06ff3cbd nc_files: add a python based 'filter program' test program
for basic testing of screens that do filtering.
This python version covers us if qt5 is not available.
2020-11-14 20:15:22 -08:00

21 lines
416 B
Python

import time
import sys
for i in range(0,100):
try:
# simulate calculation time
time.sleep(.1)
# output a line of gcode
print >>sys.stdout, 'G0 X1'
# update progress
print >>sys.stderr, 'FILTER_PROGRESS={}'.format(i)
except:
# This causes an error message
print >>sys.stderr, 'Error; But this was only a test'
raise SystemExit(1)