mirror of
https://github.com/phooky/Apple-410.git
synced 2024-10-31 21:07:02 +00:00
strip cruft from __init__
This commit is contained in:
parent
337fb247ea
commit
b2b41de183
@ -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())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user