Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

Project Description

About

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

Documentation: http://bincopy.readthedocs.org/en/latest

Installation

pip install bincopy

Example usage

Scripting

A basic example converting from Intel HEX to Intel HEX, SREC, binary, array and hexdump formats:

>>> import bincopy
>>> f = bincopy.BinFile("tests/files/in.hex")
>>> print(f.as_ihex())
: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!')
>>> f.minimum_address
256
>>> f.maximum_address
320
>>> len(f)
64
>>> f[f.minimum_address]
bytearray(b'!')

See the test suite for additional examples.

Command line tool

Print general information about given binary format file(s).

$ bincopy info tests/files/in.hex
Data address ranges:
                         0x00000100 - 0x00000140
Release History

Release History

This version
History Node

10.0.0

History Node

9.0.0

History Node

8.0.0

History Node

7.6.0

History Node

7.5.1

History Node

7.5.0

History Node

7.4.0

History Node

7.3.1

History Node

7.3.0

History Node

7.2.0

History Node

7.1.5

History Node

7.1.4

History Node

7.1.3

History Node

7.1.2

History Node

7.1.1

History Node

7.1.0

History Node

7.0.1

History Node

7.0.0

History Node

6.0.0

History Node

5.3.0

History Node

5.2.0

History Node

5.1.0

History Node

5.0.0

History Node

4.0.0

History Node

3.0.0

History Node

2.1.4

History Node

2.1.3

History Node

2.1.2

History Node

2.1.1

History Node

2.1.0

History Node

2.0.0

History Node

1.2.0

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bincopy-10.0.0-py2.py3-none-any.whl (10.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Dec 16, 2017
bincopy-10.0.0.tar.gz (14.0 kB) Copy SHA256 Checksum SHA256 Source Dec 16, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting