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.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distributions

xmodem-0.1.linux-i686.tar.gz (8.3 kB view hashes)

Uploaded Source

xmodem-0.1-py2.6.egg (10.1 kB view hashes)

Uploaded Source

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