Skip to main content

XMODEM protocol implementation.

Project description

https://travis-ci.org/tehmaze/xmodem.png?branch=master https://coveralls.io/repos/tehmaze/xmodem/badge.png

XMODEM protocol implementation

Documentation available at http://packages.python.org/xmodem/

Python Package Index (PyPI) page is available at https://pypi-hypernode.com/pypi/xmodem

Usage

Create a function to get and put character data (to a serial line for example):

>>> from xmodem import XMODEM
>>> def getc(size, timeout=1):
...     return data or None
...
>>> def putc(data, timeout=1):
...     return size or None
...
>>> modem = XMODEM(getc, putc)

Now, to upload a file, use the send method:

>>> stream = open('/etc/fstab', 'rb')
>>> modem.send(stream)

To download a file, use the recv method:

>>> stream = open('output', 'wb')
>>> modem.recv(stream)

For more information, take a look at the documentation.

Changes

0.4.2:
  • bugfix: documentation files missing from the release tarball Issue #16.

0.4.1
  • bugfix: re-transmit in send() on NAK or timeout, previously re-transmissions (wrongly) occurred only on garbage bytes. PR #12.

0.4.0
  • enhancement: support for python 3 PR #8.

  • bugfix: CRC failures in XMODEM.recv() were not renegotiated correctly PR #11.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xmodem-0.4.2.tar.gz (29.6 kB view details)

Uploaded Source

Built Distributions

xmodem-0.4.2-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

xmodem-0.4.2-py2-none-any.whl (34.4 kB view details)

Uploaded Python 2

File details

Details for the file xmodem-0.4.2.tar.gz.

File metadata

  • Download URL: xmodem-0.4.2.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xmodem-0.4.2.tar.gz
Algorithm Hash digest
SHA256 aee735aac28f23bdf9c43a31004a2ce2c59384f0a227b9d49e1e6f65f96894af
MD5 987d4ee4f0b89d449e97079c5cc28fcb
BLAKE2b-256 3e9d2f00f1dedbdaf85a79e5546a1aebf81a251f58eb4563697ec0770a6c2090

See more details on using hashes here.

Provenance

File details

Details for the file xmodem-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for xmodem-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 12c7a7b21e227ee5d5a7da7e79eb2e9929b8bffbb97a552b5b610e967a541f2c
MD5 481cfcd6512eec4a4b993e5b729e2adc
BLAKE2b-256 328e6954c415b94d4198f13f3c8b85ad5ef842dd62300971213c6f4a187d69be

See more details on using hashes here.

Provenance

File details

Details for the file xmodem-0.4.2-py2-none-any.whl.

File metadata

File hashes

Hashes for xmodem-0.4.2-py2-none-any.whl
Algorithm Hash digest
SHA256 760318a5692e1471a3c87e2bc129af9dc0ef624f71be0bfc534372d794d84141
MD5 90d01ce256b1fd33b2a83f2880cf0b8e
BLAKE2b-256 9a4bed83a0214555fa17cbc328a0afb89d40cb42c38e5784b4be8b7f047e908e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page