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
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.tar.gz
(6.1 kB
view details)
File details
Details for the file xmodem-0.2.tar.gz
.
File metadata
- Download URL: xmodem-0.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd8408fcc29e46dfcaf02fcb48795b6d7d6c9fbd62d9c6412771e43ec6a4d473 |
|
MD5 | cf673b88fe98fec8a040110ff689f3e1 |
|
BLAKE2b-256 | b101c3ece2c563148e3ffd94c588d2f5ad578110e7c2d92c291038a1e547b9bd |