Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples/serial.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-05-22 21:48:47 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-05-22 21:48:47 (GMT)
commit87b47c329bf60c336303f228e11ece571dbe91de (patch)
tree49ae3e0722afb420a8e237384c8f36ecf4fb6f04 /pysamples/serial.py
parent51d0563b974f4daa7150410f66d1816c42780212 (diff)
pep8 and pyflakes cleanup
Diffstat (limited to 'pysamples/serial.py')
-rw-r--r--pysamples/serial.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pysamples/serial.py b/pysamples/serial.py
index 153bf90..84772ab 100644
--- a/pysamples/serial.py
+++ b/pysamples/serial.py
@@ -9,13 +9,13 @@
# (3) use a Pop Block to retrieve any strings input from serial device.
-def myblock(tw, x): # x is the string to transmit
- import serial # you may need to install this library
+def myblock(tw, x): # x is the string to transmit
+ import serial # you may need to install this library
- # serial device on USB, 9600 baud
- ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
+ # serial device on USB, 9600 baud
+ ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
- ser.write(str(x)) #send string x
- st = ser.read(1000) #read up to 1000 bytes
- tw.lc.heap.append(st) #append to heap
- ser.close()
+ ser.write(str(x)) # send string x
+ st = ser.read(1000) # read up to 1000 bytes
+ tw.lc.heap.append(st) # append to heap
+ ser.close()