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

Uploaded Source

Built Distribution

xmodem-0.3.2-py2.7.egg (13.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for xmodem-0.3.2.tar.gz
Algorithm Hash digest
SHA256 4e57f3fadd1f3f043a23f1a87e9d36f944a21b552aabebcdb802154667396567
MD5 2740520dd087b89172d5d04f4c4158e5
BLAKE2b-256 b338f9268f8bfb1e5c0dcb51f6159d64f0466b379942c0a2802deea608f81b2a

See more details on using hashes here.

File details

Details for the file xmodem-0.3.2-py2.7.egg.

File metadata

  • Download URL: xmodem-0.3.2-py2.7.egg
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xmodem-0.3.2-py2.7.egg
Algorithm Hash digest
SHA256 6732b8d53e524de6ca79b7ee62720cdb9fcb060388c85f105c8b5b7d62918799
MD5 c909451b05a0fd62bab94a8d5ae32370
BLAKE2b-256 a60644465d4cc9b4984d60dd8ca63debda7c6378dae6d7b4f5953010e6be2912

See more details on using hashes here.

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