diff --git a/Script.py b/Script.py index 4a8d605..c3a8ee6 100644 --- a/Script.py +++ b/Script.py @@ -87,7 +87,7 @@ def getValue(self, line, key, default = None): if not key in line or (';' in line and line.find(key) > line.find(';')): return default sub_part = line[line.find(key) + 1:] - m = re.search('^[0-9]+\.?[0-9]*', sub_part) + m = re.search('^-?[0-9]+\.?[0-9]*', sub_part) if m is None: return default try: @@ -98,4 +98,4 @@ def getValue(self, line, key, default = None): ## This is called when the script is executed. # It gets a list of g-code strings and needs to return a (modified) list. def execute(self, data): - raise NotImplementedError() \ No newline at end of file + raise NotImplementedError()