Browse Source

add usb and network

master
subnixr 4 years ago
parent
commit
46e15df821
  1. 10
      autostampa.py

10
autostampa.py

@ -14,9 +14,13 @@ class Item:
conn.cut()
def connect(connection_cfg):
if "file" in connection_cfg:
return printer.File(connection_cfg["file"])
def connect(conn_cfg):
if "file" in conn_cfg:
return printer.File(conn_cfg["file"])
elif "vendor" in conn_cfg and "product" in conn_cfg:
return printer.Usb(conn_cfg["vendor"], conn_cfg["product"])
elif "host" in conn_cfg and "port" in conn_cfg:
return printer.Network(conn_cfg["host"], conn_cfg["port"])
else:
return printer.Dummy()

Loading…
Cancel
Save