3.2. grbl Support Library
The grbl support library provides host-side Python scripting which communicates
over a serial port with an Arduino running the grbl firmware for Arduino CNC motion.
-
exception
grbl.parser.
GCodeError
(value)[source]
-
class
grbl.parser.
GrblBlock
(line=None)[source]
Representation of a single line of G-code.
-
g_codes
()[source]
Return a list of all numeric values from words containing a G command code.
-
is_trivial
()[source]
Returns true if the block has no meaningful content.
-
m_codes
()[source]
Return a list of all numeric values from words containing a M command code.
-
class
grbl.parser.
GrblParser
(args)[source]
Representation of a g-code interpreter for parsing and checking g-code
streams for the grbl G-code interpreter. This class tracks the expected
internal state of the interpreter and can apply code transformations and
regenerate clean output.
-
process_block
(props)[source]
Interpret a property dictionary representing a single line of G-code and
update the internal interpreter state to reflect the execution effects.
-
grbl.parser.
parse_gcode_file
(input_file)[source]
Parse an entire G-code file into a list of block property objects, one per meaningful block.