Skip to main content

Mangling of various file formats that conveys binary information (Motorola S-Record, Intel HEX and binary files).

Project description

buildstatus

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.BinFile()
>>> f.add_ihex_file("tests/files/in.hex")
>>> print(f.as_ihex())
:20010000214601360121470136007EFE09D219012146017E17C20001FF5F16002148011979
:20012000194E79234623965778239EDA3F01B2CA3F0156702B5E712B722B7321460134219F
:00000001FF

>>> print(f.as_srec())
S32500000100214601360121470136007EFE09D219012146017E17C20001FF5F16002148011973
S32500000120194E79234623965778239EDA3F01B2CA3F0156702B5E712B722B73214601342199
S5030002FA

>>> f.as_binary()
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-4.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bincopy-4.0.0-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file bincopy-4.0.0.tar.gz.

File metadata

  • Download URL: bincopy-4.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bincopy-4.0.0.tar.gz
Algorithm Hash digest
SHA256 49fa92bc0c49cfc4f7dfdf56a7eff6b0703fb0c85a8042b0fea9a852d60a6969
MD5 f7fced757b98ce2aa9e479fa609bf7a2
BLAKE2b-256 3102914478567be6d85705875de4538b0807fd9082aa0584e73f46aa64b59eff

See more details on using hashes here.

File details

Details for the file bincopy-4.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for bincopy-4.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 de658052a737bda122b9da2765602e2b93421ba7d103382529be778c0713bc6b
MD5 1dc56f903792fe0d32d8f3709acfb0d3
BLAKE2b-256 3e3003618df6b53b3f289e9bb4f97bd1f68e56c45f4a8e9de6cd9134d0e32ddd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page