mirror of
https://github.com/BKLronin/touchCNC.git
synced 2024-12-21 06:14:01 +01:00
new gerbil
This commit is contained in:
parent
b4d2bcebab
commit
56076fc4b4
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
@ -1 +0,0 @@
|
|||||||
Subproject commit 37758e6f60805b7ed00b2880420bfc8a928ce3a3
|
|
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.")
|
Loading…
Reference in New Issue
Block a user