Skip to content
Snippets Groups Projects
Commit 036e8287 authored by Marko Mecina's avatar Marko Mecina
Browse files

add hex property to rawgettersetter

parent a255da8a
No related branches found
No related tags found
No related merge requests found
...@@ -182,6 +182,10 @@ class RawGetterSetter: ...@@ -182,6 +182,10 @@ class RawGetterSetter:
def raw(self, rawdata): def raw(self, rawdata):
self.bin[:] = rawdata self.bin[:] = rawdata
@property
def hex(self):
return bytes(self.bin).hex(' ').upper()
class PHeaderBits(ctypes.BigEndianStructure): class PHeaderBits(ctypes.BigEndianStructure):
_pack_ = 1 _pack_ = 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment