19 lines
322 B
Python
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:
|
|
|
|
|
|
|
|
|