Package pyrobot :: Package system :: Package serial :: Module serialutil :: Class FileLike
[frames | no frames]

Type FileLike

object --+
         |
        FileLike

Known Subclasses:
SerialBase

An abstract file like class.

This class implements readline and readlines based on read and
writelines based on write.
This class is used to provide the above functions for to Serial
port objects.

Note that when the serial port was opened with _NO_ timeout that
readline blocks until it sees a newline (or the specified size is
reached) and that readlines would never return and therefore
refuses to work (it raises an exception in this case)!

Method Summary
  flush(self)
flush of file like objects...
  read(self, size)
  readline(self, size, eol)
read a line which is terminated with end-of-line (eol) character...
  readlines(self, sizehint, eol)
read a list of lines, until timeout...
  write(self, s)
  writeline(self, message, eol)
  writelines(self, sequence)
  xreadlines(self, sizehint)
just call readlines - here for compatibility...
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature...
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...

Method Details

flush(self)

flush of file like objects

readline(self, size=None, eol='\n')

read a line which is terminated with end-of-line (eol) character
        ('
' by default) or until timeout

readlines(self, sizehint=None, eol='\n')

read a list of lines, until timeout
sizehint is ignored

xreadlines(self, sizehint=None)

just call readlines - here for compatibility

Generated by Epydoc 2.1 on Mon Jul 25 01:39:27 2005 http://epydoc.sf.net