I tried to create a class in python using RawIOBase as shown below.
try:
import io
except ImportError:
class Serial(PosixSerial, FileLike):
pass
else:
class Serial(PosixSerial, io.RawIOBase):
pass
I tried to run this using Python 2.6, but it displays an error:
AttributeError: the 'module' object does not have the 'RawIOBase' attribute
I read that RawIOBase is supported with Python 2.6 onwards.
source
share