https://github.com/mattytrentini/micropython-hexdump
  
  
    An implementation of Hexdump for MicroPython 
    https://github.com/mattytrentini/micropython-hexdump
  
        Last synced: 6 months ago 
        JSON representation
    
An implementation of Hexdump for MicroPython
- Host: GitHub
 - URL: https://github.com/mattytrentini/micropython-hexdump
 - Owner: mattytrentini
 - License: mit
 - Created: 2023-07-12T02:17:26.000Z (over 2 years ago)
 - Default Branch: main
 - Last Pushed: 2024-02-19T11:46:59.000Z (over 1 year ago)
 - Last Synced: 2024-08-04T00:07:28.358Z (over 1 year ago)
 - Language: Python
 - Size: 4.88 KB
 - Stars: 3
 - Watchers: 1
 - Forks: 1
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE
 
 
Awesome Lists containing this project
- awesome-micropython - micropython-hexdump - An implementation of Hexdump for MicroPython. (Libraries / Utilities)
 
README
          # micropython-hexdump
A simple implementation of hexdump (`hd` and `xxd`) tools for MicroPython.
## Installation
Use `mip` from the command line using `mpremote`:
```bash
> mpremote mip install github:mattytrentini/micropython-hexdump
```
or from within a running instance of MicroPython that has an established
internet connection.
```python
>>> import mip
>>> mip.install("github:mattytrentini/micropython-hexdump")
```
## Example usage
```text
>>> from os import urandom
>>> from hexdump import hd, xxd
>>> data = urandom(100)
>>> hd(data)
00000000  4d 9a 16 3d 4c 87 c4 31  9e 95 36 e3 f8 49 4b 4b  |M..=L..1..6..IKK|
00000010  98 12 6b b6 a6 a3 fd 1b  91 a5 21 95 73 ac 35 6f  |..k.......!.s.5o|
00000020  dc b4 4d 0b 43 fb bb 36  d6 17 52 4d 40 b4 04 ed  |..M.C..6..RM@...|
00000030  2b 7c 8b 30 84 a3 96 9a  71 e4 e5 69 d1 62 b7 06  |+|.0....q..i.b..|
00000040  fd 89 3a f7 b3 06 04 39  f9 70 62 33 d2 56 35 e2  |..:....9.pb3.V5.|
00000050  fc 7e 16 46 5f 35 1d 62  63 d4 5c 18 f3 de 6d 3c  |.~.F_5.bc.\...m<|
00000060  a1 1f fa ed                                       |....|
00000061
>>> xxd(data)
00000000: 4d 9a 16 3d 4c 87 c4 31 9e 95 36 e3 f8 49 4b 4b  M..=L..1..6..IKK
00000010: 98 12 6b b6 a6 a3 fd 1b 91 a5 21 95 73 ac 35 6f  ..k.......!.s.5o
00000020: dc b4 4d 0b 43 fb bb 36 d6 17 52 4d 40 b4 04 ed  ..M.C..6..RM@...
00000030: 2b 7c 8b 30 84 a3 96 9a 71 e4 e5 69 d1 62 b7 06  +|.0....q..i.b..
00000040: fd 89 3a f7 b3 06 04 39 f9 70 62 33 d2 56 35 e2  ..:....9.pb3.V5.
00000050: fc 7e 16 46 5f 35 1d 62 63 d4 5c 18 f3 de 6d 3c  .~.F_5.bc.\...m<
00000060: a1 1f fa ed                                      ....
```