gcode_reader.syntax

Attributes

Functions

available_flavors(→ list[str])

Returns a list of available G-code flavor keys

resolve_flavor(→ dict)

Helper function to resolve gcode flavor from string or dict

Module Contents

gcode_reader.syntax.available_flavors() list[str][source]

Returns a list of available G-code flavor keys

Returns:

List of available G-code flavor keys

Return type:

list[str]

gcode_reader.syntax.resolve_flavor(flavor: str) dict[source]

Helper function to resolve gcode flavor from string or dict

Parameters:

flavor (str | dict) – G-code flavor as a string key or a dictionary

Raises:
  • ValueError – If the flavor string is not recognized

  • TypeError – If the flavor is not a string or a dictionary

Returns:

G-code flavor dictionary

Return type:

dict

gcode_reader.syntax.ABS_POSITION = ['x', 'y', 'z']
gcode_reader.syntax.flavors
gcode_reader.syntax.floating_point_regex = '[-+]?\\d*\\.?\\d+(?:[eE](?:[-+]?\\d*\\.?\\d+))?'