GCode-Generator/simulator.py
2025-01-13 18:09:02 +01:00

19 lines
322 B
Python

import socket
import hardware
import os
class Simulator:
def __init__(self, bind):
self.s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
try:
os.remove(bind)
except FileNotFoundError:
pass
self.s.bind(bind)
self.s.listen()
while True: