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 Distribution
xmodem-0.4.2.tar.gz
(29.6 kB
view details)
Built Distributions
xmodem-0.4.2-py3-none-any.whl
(34.2 kB
view details)
xmodem-0.4.2-py2-none-any.whl
(34.4 kB
view details)
File details
Details for the file xmodem-0.4.2.tar.gz
.
File metadata
- Download URL: xmodem-0.4.2.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aee735aac28f23bdf9c43a31004a2ce2c59384f0a227b9d49e1e6f65f96894af |
|
MD5 | 987d4ee4f0b89d449e97079c5cc28fcb |
|
BLAKE2b-256 | 3e9d2f00f1dedbdaf85a79e5546a1aebf81a251f58eb4563697ec0770a6c2090 |
Provenance
File details
Details for the file xmodem-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: xmodem-0.4.2-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c7a7b21e227ee5d5a7da7e79eb2e9929b8bffbb97a552b5b610e967a541f2c |
|
MD5 | 481cfcd6512eec4a4b993e5b729e2adc |
|
BLAKE2b-256 | 328e6954c415b94d4198f13f3c8b85ad5ef842dd62300971213c6f4a187d69be |
Provenance
File details
Details for the file xmodem-0.4.2-py2-none-any.whl
.
File metadata
- Download URL: xmodem-0.4.2-py2-none-any.whl
- Upload date:
- Size: 34.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 760318a5692e1471a3c87e2bc129af9dc0ef624f71be0bfc534372d794d84141 |
|
MD5 | 90d01ce256b1fd33b2a83f2880cf0b8e |
|
BLAKE2b-256 | 9a4bed83a0214555fa17cbc328a0afb89d40cb42c38e5784b4be8b7f047e908e |