Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: third_party/twisted_8_1/twisted/internet/_posixserialport.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/twisted_8_1/twisted/internet/_posixserialport.py
diff --git a/third_party/twisted_8_1/twisted/internet/_posixserialport.py b/third_party/twisted_8_1/twisted/internet/_posixserialport.py
deleted file mode 100644
index c94ecee35c7341bdd3b31bee7e43497040f92ec0..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/internet/_posixserialport.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (c) 2001-2007 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-
-"""
-Serial Port Protocol
-"""
-
-# system imports
-import os, errno
-
-# dependent on pyserial ( http://pyserial.sf.net/ )
-# only tested w/ 1.18 (5 Dec 2002)
-import serial
-from serial import PARITY_NONE, PARITY_EVEN, PARITY_ODD
-from serial import STOPBITS_ONE, STOPBITS_TWO
-from serial import FIVEBITS, SIXBITS, SEVENBITS, EIGHTBITS
-
-from serialport import BaseSerialPort
-
-# twisted imports
-from twisted.internet import abstract, fdesc, main
-
-class SerialPort(BaseSerialPort, abstract.FileDescriptor):
- """
- A select()able serial device, acting as a transport.
- """
-
- connected = 1
-
- def __init__(self, protocol, deviceNameOrPortNumber, reactor,
- baudrate = 9600, bytesize = EIGHTBITS, parity = PARITY_NONE,
- stopbits = STOPBITS_ONE, timeout = 0, xonxoff = 0, rtscts = 0):
- abstract.FileDescriptor.__init__(self, reactor)
- self._serial = serial.Serial(deviceNameOrPortNumber, baudrate = baudrate, bytesize = bytesize, parity = parity, stopbits = stopbits, timeout = timeout, xonxoff = xonxoff, rtscts = rtscts)
- self.reactor = reactor
- self.flushInput()
- self.flushOutput()
- self.protocol = protocol
- self.protocol.makeConnection(self)
- self.startReading()
-
- def fileno(self):
- return self._serial.fd
-
- def writeSomeData(self, data):
- """
- Write some data to the serial device.
- """
- return fdesc.writeToFD(self.fileno(), data)
-
- def doRead(self):
- """
- Some data's readable from serial device.
- """
- return fdesc.readFromFD(self.fileno(), self.protocol.dataReceived)
-
- def connectionLost(self, reason):
- abstract.FileDescriptor.connectionLost(self, reason)
- self._serial.close()
« no previous file with comments | « third_party/twisted_8_1/twisted/internet/_pollingfile.py ('k') | third_party/twisted_8_1/twisted/internet/_posixstdio.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698