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

Method _getCodeFloat

src/astroprint/printfiles/gcode.py:320–330  ·  view source on GitHub ↗
(self, line, code)

Source from the content-addressed store, hash-verified

318 return None
319
320 def _getCodeFloat(self, line, code):
321 n = line.find(code) + 1
322 if n < 1:
323 return None
324 m = line.find(' ', n)
325 try:
326 if m < 0:
327 return float(line[n:])
328 return float(line[n:m])
329 except:
330 return None
331

Callers 1

_loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected