blob: e31fddd910307fc389774d1c483b6445d5fa7b7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# trivial example
def _pi(self, *args):
return 3.1415926535
# the Python equivalent of '#<_motion_mode> :
# return the currently active motion code (times 10)
def _py_motion_mode(self, *args):
return self.active_g_codes[1]
def _error(self, *args):
# this sets the error message and aborts execution (except in (debug,#<_err>))
return "badly botched"
# return a whacky type to exercise the error reporting mechanism
def _badreturntype(self, *args):
return object()
|