strip cruft from __init__

This commit is contained in:
Adam Mayer 2017-12-09 21:22:13 -05:00
parent 337fb247ea
commit b2b41de183

View File

@ -1,7 +1,6 @@
#!/usr/bin/python3
import serial
import time
import sys
class Apple410:
"""A simple class for queing up commands for the Apple 410"""
@ -35,17 +34,3 @@ class Apple410:
def pen_select(self, index):
self.send('PS{}'.format(index))
if __name__ == '__main__':
scr = 'test_script.cmds'
if len(sys.argv) > 1:
scr = sys.argv[1]
print("Running file {}".format(scr))
a = Apple410('/dev/ttyUSB0')
if scr == "-":
f = sys.stdin
else:
f = open(scr)
for line in f.readlines():
print("SENDING: {}".format(line.strip()))
a.send(line.strip())