XMODEM protocol implementation.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
xmodem-0.4.1-py2-none-any.whl
(34.1 kB
view details)
File details
Details for the file xmodem-0.4.1-py2-none-any.whl
.
File metadata
- Download URL: xmodem-0.4.1-py2-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 270d25329158fe3598d775f57b2c4db77bca214de19f0b40bad0b05751eca3cf |
|
MD5 | 8310f3238e8010cbb843cef1d0016f5c |
|
BLAKE2b-256 | dd59831232beffe1855e458d6eed312a93201f5291a1a85574fdbd5b60f480f9 |