MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / parse_line

Function parse_line

src/ext/makerbot_driver/Gcode/Utils.py:71–81  ·  view source on GitHub ↗

Parse a line of gcode into a map of codes, and a comment field. @param string line: line of gcode to parse @return tuple containing a dict of codes, a list of flags, and a comment string

(line)

Source from the content-addressed store, hash-verified

69
70
71def parse_line(line):
72 """
73 Parse a line of gcode into a map of codes, and a comment field.
74 @param string line: line of gcode to parse
75 @return tuple containing a dict of codes, a list of flags, and a comment string
76 """
77
78 command, comment = extract_comments(line)
79 codes, flags = parse_command(command)
80
81 return codes, flags, comment
82
83
84def check_for_extraneous_codes(codes, allowed_codes):

Callers

nothing calls this directly

Calls 2

extract_commentsFunction · 0.85
parse_commandFunction · 0.85

Tested by

no test coverage detected