diff --git a/script.py b/script.py index 7fe8f94..d9c77cd 100644 --- a/script.py +++ b/script.py @@ -57,7 +57,9 @@ def quantifier (words): #print(type(objects)) #print(objects) def dotprint(text): - os.system('echo "'+text+'"> /dev/usb/lp0') + printerpath = '/dev/usb/lp0' + if os.path.exists(printerpath): + os.system(f'echo "{text}"> { printerpath }') print(text) #object = ["teammate", "card", "turn", "place", "board", "dice", "nice", "backgammon"] #verb = ["choose", "pick", "give", "burn", "cut"]