Mangling of various file formats that conveys binary information (Motorola S-Record, Intel HEX and binary files).
Project description
Installation
pip install bincopy
Example usage
See the test suite: https://github.com/eerimoq/bincopy/blob/master/tests/test_bincopy.py
A basic example converting from Intel HEX to Intel HEX, SREC and binary formats:
>>> import bincopy
>>> f = bincopy.File()
>>> with open("tests/files/in.hex", "r") as fin:
... f.add_ihex(fin)
>>> print(f.as_ihex())
:020000040000FA
:20010000214601360121470136007EFE09D219012146017E17C20001FF5F16002148011979
:20012000194E79234623965778239EDA3F01B2CA3F0156702B5E712B722B7321460134219F
:00000001FF
>>> print(f.as_srec())
S32500000100214601360121470136007EFE09D219012146017E17C20001FF5F16002148011973
S32500000120194E79234623965778239EDA3F01B2CA3F0156702B5E712B722B73214601342199
S5030002FA
>>> f.as_binary()
bytearray(b'!F\x016\x01!G\x016\x00~\xfe\t\xd2\x19\x01!F\x01~\x17\xc2\x00\x01\xff_\x16\x00!H\x01\x19\x19Ny#F#\x96Wx#\x9e\xda?\x01\xb2\xca?\x01Vp+^q+r+s!F\x014!')
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
bincopy-1.1.1.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bincopy-1.1.1.tar.gz.
File metadata
- Download URL: bincopy-1.1.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42b16d0a12743a3f30daaa78a091f46755aff19a954c924cbbfbd9fd6490b3be
|
|
| MD5 |
f7b20b69a5dac5506e03aae0105b4730
|
|
| BLAKE2b-256 |
75ea1d24f5d02ef8008ac4ee70d35d4c88e75cd46001a1251c75c07003b5a11b
|
File details
Details for the file bincopy-1.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: bincopy-1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8209c0ec3338a14e59fefa606a89ba5f006a6e289c5a7fb2c44c713b45ea11b3
|
|
| MD5 |
30cc3b405a509a3d05bdc481d9fd6884
|
|
| BLAKE2b-256 |
dbe2c00550ad075588f430e11bcf1072c81d42d9296fe8f41a4be5c364ad3cdc
|