Basic tools to read, filter, format and display hex values
Project description
Description
Basic tools to read, format, filter and display hex values
Installation
pip install hexlib
Usage
- The class
HexTwin
is the hexadecimal representation of a file - The class
Hexdump
format and prints:HexTwin
instances- Lists of hex values
- ["AA", "BB", "CC", "DD", "EE", "00"]
Example
from hexlib.HexTwin import HexTwin
from hexlib.Hexdump import Hexdump
# 1.) HexTwin instance
twin = HexTwin("path/to/file/test.txt")
dump = Hexdump()
# Activates filtering for zero rows
dump.filter(filterZeroRows=True)
twin.printTwin(t)
# Activates filtering for non-ascii rows (Includes zero rows)
dump.filter(filterNonAsciiRows=True)
twin.printTwin(t)
# 2.) List of hex values
a = ["AA", "BB", "CC", "DD", "EE"]
b = Hexdump()
b.printHexValues(a)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hexlib-1.0.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
hexlib-1.0.0-py3-none-any.whl
(5.2 kB
view hashes)