Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getc/putc signature in documentation #2

Open
wants to merge 1 commit into
base: multi-protocol
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This package ports the XMODEM, YMODEM and ZMODEM protocols to Python. We try to
implement the protocols as minimalistic as possible without breaking the
protocol specifications.

The interface to most modem classes are pretty similair. Keep in mind though,
The interface to most modem classes are pretty similar. Keep in mind though,
that the XMODEM protocol can send one file (stream) at a time, whereas the
YMODEM and ZMODEM protocols can send multiple.

Expand All @@ -24,11 +24,11 @@ An example using ``STDIN``/``STDOUT`` may read::

>>> import select
>>> import sys
>>> def getc(size, timeout=5):
>>> def getc(size, timeout=5, debug=False):
... r, w, e = select.select([sys.stdin.fileno()], [], [], timeout)
... if r: return sys.stdin.read(size)
...
>>> def putc(data, timeout):
>>> def putc(data, timeout, debug=False):
... r, w, e = select.select([], [sys.stdout.fileno()], [], timeout)
... if w: return sys.stdout.write(data)
...
Expand Down
6 changes: 3 additions & 3 deletions modem/protocol/xmodem.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class XMODEM(Modem):
XMODEM protocol implementation, expects an object to read from and an
object to write to.

>>> def getc(size, timeout=1):
>>> def getc(size, timeout=1, debug=False):
... return data or None
...
>>> def putc(data, timeout=1):
>>> def putc(data, timeout=1, debug=False):
... return size or None
...
>>> modem = XMODEM(getc, putc)
Expand All @@ -38,7 +38,7 @@ def send(self, stream, retry=16, timeout=60, quiet=0):
>>> print modem.send(stream)
True

Returns ``True`` upon succesful transmission or ``False`` in case of
Returns ``True`` upon successful transmission or ``False`` in case of
failure.
'''

Expand Down
2 changes: 1 addition & 1 deletion modem/protocol/xmodem1k.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def send(self, stream, retry=16, timeout=60):
>>> print modem.send(stream)
True

Returns ``True`` upon succesful transmission or ``False`` in case of
Returns ``True`` upon successful transmission or ``False`` in case of
failure.
'''

Expand Down
2 changes: 1 addition & 1 deletion modem/protocol/xmodemcrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def send(self, stream, retry=16, timeout=60):
>>> print modem.send(stream)
True

Returns ``True`` upon succesful transmission or ``False`` in case of
Returns ``True`` upon successful transmission or ``False`` in case of
failure.
'''

Expand Down
2 changes: 1 addition & 1 deletion modem/protocol/ymodem.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def send(self, pattern, retry=3, timeout=60):
>>> print modem.send('*.txt')
True

Returns ``True`` upon succesful transmission or ``False`` in case of
Returns ``True`` upon successful transmission or ``False`` in case of
failure.
'''

Expand Down