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

Method _getCodeInt

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

Source from the content-addressed store, hash-verified

306 return {key: value for (key, value) in map(lambda x: x.split("=", 1), zlib.decompress(base64.b64decode(comment[len("CURA_PROFILE_STRING:"):])).split("\b"))}
307
308 def _getCodeInt(self, line, code):
309 n = line.find(code) + 1
310 if n < 1:
311 return None
312 m = line.find(' ', n)
313 try:
314 if m < 0:
315 return int(line[n:])
316 return int(line[n:m])
317 except:
318 return None
319
320 def _getCodeFloat(self, line, code):
321 n = line.find(code) + 1

Callers 1

_loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected