summaryrefslogtreecommitdiff
path: root/paramiko/buffered_pipe.py
diff options
context:
space:
mode:
authorOlle Lundberg <olle.lundberg@klarna.com>2014-01-23 11:32:59 +0100
committerOlle Lundberg <olle.lundberg@klarna.com>2014-01-23 11:32:59 +0100
commit24635609dc5ab8aff2e7fa3f34c4993cbc424579 (patch)
tree7be1e6ee8e6df7e90c188cd8949cbb8fba9e372e /paramiko/buffered_pipe.py
parentdde21a7de09bd92a6a362a26009a56a942b3d246 (diff)
downloadparamiko-24635609dc5ab8aff2e7fa3f34c4993cbc424579.tar.gz
Epydoc -> Sphinx.
Diffstat (limited to 'paramiko/buffered_pipe.py')
-rw-r--r--paramiko/buffered_pipe.py52
1 files changed, 26 insertions, 26 deletions
diff --git a/paramiko/buffered_pipe.py b/paramiko/buffered_pipe.py
index 4ef5cf74..23ed9f44 100644
--- a/paramiko/buffered_pipe.py
+++ b/paramiko/buffered_pipe.py
@@ -29,7 +29,7 @@ import time
class PipeTimeout (IOError):
"""
- Indicates that a timeout was reached on a read from a L{BufferedPipe}.
+ Indicates that a timeout was reached on a read from a :class:`BufferedPipe`.
"""
pass
@@ -38,7 +38,7 @@ class BufferedPipe (object):
"""
A buffer that obeys normal read (with timeout) & close semantics for a
file or socket, but is fed data from another thread. This is used by
- L{Channel}.
+ :class:`Channel`.
"""
def __init__(self):
@@ -54,8 +54,8 @@ class BufferedPipe (object):
buffer has been closed), the event will be set. When no data is
ready, the event will be cleared.
- @param event: the event to set/clear
- @type event: Event
+ :param event: the event to set/clear
+ :type event: Event
"""
self._event = event
if len(self._buffer) > 0:
@@ -68,8 +68,8 @@ class BufferedPipe (object):
Feed new data into this pipe. This method is assumed to be called
from a separate thread, so synchronization is done.
- @param data: the data to add
- @type data: str
+ :param data: the data to add
+ :type data: str
"""
self._lock.acquire()
try:
@@ -83,12 +83,12 @@ class BufferedPipe (object):
def read_ready(self):
"""
Returns true if data is buffered and ready to be read from this
- feeder. A C{False} result does not mean that the feeder has closed;
+ feeder. A ``False`` result does not mean that the feeder has closed;
it means you may need to wait before more data arrives.
- @return: C{True} if a L{read} call would immediately return at least
- one byte; C{False} otherwise.
- @rtype: bool
+ :return: ``True`` if a :class:`read` call would immediately return at least
+ one byte; ``False`` otherwise.
+ :rtype: bool
"""
self._lock.acquire()
try:
@@ -102,23 +102,23 @@ class BufferedPipe (object):
"""
Read data from the pipe. The return value is a string representing
the data received. The maximum amount of data to be received at once
- is specified by C{nbytes}. If a string of length zero is returned,
+ is specified by ``nbytes``. If a string of length zero is returned,
the pipe has been closed.
- The optional C{timeout} argument can be a nonnegative float expressing
- seconds, or C{None} for no timeout. If a float is given, a
- C{PipeTimeout} will be raised if the timeout period value has
+ The optional ``timeout`` argument can be a nonnegative float expressing
+ seconds, or ``None`` for no timeout. If a float is given, a
+ ``PipeTimeout`` will be raised if the timeout period value has
elapsed before any data arrives.
- @param nbytes: maximum number of bytes to read
- @type nbytes: int
- @param timeout: maximum seconds to wait (or C{None}, the default, to
+ :param nbytes: maximum number of bytes to read
+ :type nbytes: int
+ :param timeout: maximum seconds to wait (or ``None``, the default, to
wait forever)
- @type timeout: float
- @return: data
- @rtype: str
+ :type timeout: float
+ :return: data
+ :rtype: str
- @raise PipeTimeout: if a timeout was specified and no data was ready
+ :raises PipeTimeout: if a timeout was specified and no data was ready
before that timeout
"""
out = ''
@@ -158,8 +158,8 @@ class BufferedPipe (object):
"""
Clear out the buffer and return all data that was in it.
- @return: any data that was in the buffer prior to clearing it out
- @rtype: str
+ :return: any data that was in the buffer prior to clearing it out
+ :rtype: str
"""
self._lock.acquire()
try:
@@ -173,7 +173,7 @@ class BufferedPipe (object):
def close(self):
"""
- Close this pipe object. Future calls to L{read} after the buffer
+ Close this pipe object. Future calls to :class:`read` after the buffer
has been emptied will return immediately with an empty string.
"""
self._lock.acquire()
@@ -189,8 +189,8 @@ class BufferedPipe (object):
"""
Return the number of bytes buffered.
- @return: number of bytes bufferes
- @rtype: int
+ :return: number of bytes bufferes
+ :rtype: int
"""
self._lock.acquire()
try: