mirror of
https://github.com/BKLronin/touchCNC.git
synced 2025-11-04 16:19:42 +01:00
new gerbil
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "gcode_machine"]
|
||||
path = gcode_machine
|
||||
url = https://github.com/michaelfranzl/gcode_machine.git
|
||||
1
gerbil
1
gerbil
Submodule gerbil deleted from 37758e6f60
13
regex_test.py
Normal file
13
regex_test.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import re
|
||||
|
||||
|
||||
line = "<Idle|WPos:69.000,40.000,-20.000|Bf:15,128|FS:0,0>"
|
||||
pattern = r"<[^|]*\|WPos:([^,]*),([^,]*),([^|]*)\|"
|
||||
m = re.match(pattern, line)
|
||||
|
||||
if m:
|
||||
print("Group 1 (X):", m.group(1))
|
||||
print("Group 2 (Y):", m.group(2))
|
||||
print("Group 3 (Z):", m.group(3))
|
||||
else:
|
||||
print("No match found.")
|
||||
Reference in New Issue
Block a user