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
...
>>> 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.

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

Uploaded Source

Built Distribution

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for xmodem-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a04d4dac5f87f9ec1928764bb67c61d51a9df38e9b4c512609a79bee216a3726
MD5 af25915ca4edccd0159892acb405be13
BLAKE2b-256 d57e580549efc72f0137d0cb4cd583e1c3be3bc1cdadb0eb29f855381a5f900b

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for xmodem-0.2.2-py2.6.egg
Algorithm Hash digest
SHA256 fbd14c57dd870de7e23fe55195e5a326c977d7ecbef0b8767c8a90c54beef458
MD5 3403130bd7505ee4a13837152f24d7c9
BLAKE2b-256 7dcad66bbf3f22d30dfeaedce639e31b3965ac69c6b04e471340338198278894

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