Skip to main content

XMODEM protocol implementation.

Project description

Documentation available at http://packages.python.org/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
...
>>> x = XMODEM(getc, putc)

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

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

To download a file, use the recv method:

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

For more information, take a look at the documentation.

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.2.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

xmodem-0.2.1-py2.6.egg (10.5 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for xmodem-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7199678b93765e1d2d9154229be1745d6861c9fc40b71bc4b424fb0e664506d3
MD5 c2701be7ae4266b1dd66f077c773bbb3
BLAKE2b-256 e71b40d615b1cd5e32acefdbc464bd945e2ef8077e267acfd6685d29e90beca6

See more details on using hashes here.

Provenance

File details

Details for the file xmodem-0.2.1-py2.6.egg.

File metadata

  • Download URL: xmodem-0.2.1-py2.6.egg
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xmodem-0.2.1-py2.6.egg
Algorithm Hash digest
SHA256 a8637cbba5e4934941b3cf66c93c024061c23e8e8172a909bdbd7e7f1a0a546c
MD5 29bdfece603a490d601665bb233fd8f4
BLAKE2b-256 718fd0ff7483e064b595f4ef465d83fd27edd301fb02c6918c0f4c0b5a94c1e8

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