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.4.tar.gz
(6.1 kB
view details)
Built Distribution
xmodem-0.2.4-py2.6.egg
(10.5 kB
view details)
File details
Details for the file xmodem-0.2.4.tar.gz
.
File metadata
- Download URL: xmodem-0.2.4.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c574184fe5f217a1696703b93659475a2f0d64dc15fb82f935cc81f93f34f09 |
|
MD5 | 8bdc82e8b76bea8d6690376a8223e8b7 |
|
BLAKE2b-256 | beb8b3f345e88b8549c60f4b98afdae5e6d4587d56f020cc6fd2b441d1ceb5e0 |
Provenance
File details
Details for the file xmodem-0.2.4-py2.6.egg
.
File metadata
- Download URL: xmodem-0.2.4-py2.6.egg
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41c112da85b591f6f1542ddc4670b984fd80c740fb0af097e19898c163074b29 |
|
MD5 | d29577289e7b69002107ad0e2c5f2e16 |
|
BLAKE2b-256 | 93a9d004bc0cddc62fd2cd3252059252798a08220f5e5873fee314abdd2ce575 |