aboutsummaryrefslogtreecommitdiffstats
path: root/nc_files/filtertest.py
blob: 9f08327920f03f88b37bc72c66043a3d6f686a79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import time
import sys

for i in range(0,100):
    try:
        # simulate calculation time
        time.sleep(.1)

        # output a line of gcode
        print('G0 X1', file=sys.stdout)

        # update progress
        print('FILTER_PROGRESS={}'.format(i), file=sys.stderr)
    except:
        # This causes an error message
        print('Error; But this was only a test', file=sys.stderr)
        raise SystemExit(1)

print('M2', file=sys.stdout)
bues.ch cgit interface