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
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 Distribution
xmodem-0.2.3.tar.gz
(6.1 kB
view details)
Built Distribution
xmodem-0.2.3-py2.6.egg
(10.5 kB
view details)
File details
Details for the file xmodem-0.2.3.tar.gz
.
File metadata
- Download URL: xmodem-0.2.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc347708d501048943f7150e7710b6d3aa7c9ad951c38f6084dda109449ce564 |
|
MD5 | effd0018ebc2fe7a7aba24ca1a4f3a87 |
|
BLAKE2b-256 | b2cd1b35cfd0d2e23ec8a666f5f7107dae6d37ee26be448bd7f2401a882eb25c |
File details
Details for the file xmodem-0.2.3-py2.6.egg
.
File metadata
- Download URL: xmodem-0.2.3-py2.6.egg
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a58a7f108c4005b5e07fd61205950f42f1fae0ce5c3a94de46cd465eebee2b0 |
|
MD5 | ee6b8fd925fc916b68e9ec59c38cd546 |
|
BLAKE2b-256 | 7c879009da5f4124a16796a198286d836a258d7da5c6d951cec6b228f8fee117 |