summaryrefslogtreecommitdiff
path: root/serial/serialposix.py
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2016-01-30 23:42:38 +0100
committerChris Liechti <cliechti@gmx.net>2016-01-30 23:42:38 +0100
commit9bea94de5ed45439abe8f47b0ae34d5dc58d76cb (patch)
tree1197b64ec149a4f69a6502a8cd02e790e554163e /serial/serialposix.py
parent060ea1f7c0cb0824aabf91fdaedde88ffa87bdc7 (diff)
downloadpyserial-git-9bea94de5ed45439abe8f47b0ae34d5dc58d76cb.tar.gz
remove inconsistent and unused main of platform modules
Diffstat (limited to 'serial/serialposix.py')
-rw-r--r--serial/serialposix.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/serial/serialposix.py b/serial/serialposix.py
index 5f54786..df73633 100644
--- a/serial/serialposix.py
+++ b/serial/serialposix.py
@@ -778,23 +778,3 @@ class VTIMESerial(Serial):
break
read.extend(buf)
return bytes(read)
-
-
-if __name__ == '__main__':
- s = Serial(0,
- baudrate=19200, # baud rate
- bytesize=serial.EIGHTBITS, # number of data bits
- parity=serial.PARITY_EVEN, # enable parity checking
- stopbits=serial.STOPBITS_ONE, # number of stop bits
- timeout=3, # set a timeout value, None for waiting forever
- xonxoff=0, # enable software flow control
- rtscts=0, # enable RTS/CTS flow control
- )
- s.rts = True
- s.dtr = True
- s.reset_input_buffer()
- s.reset_output_buffer()
- s.write('hello')
- sys.stdout.write('%r\n' % s.read(5))
- sys.stdout.write('%s\n' % s.inWaiting())
- del s