jk_prettyprintobj 0.2024.10.20__py3-none-any.whl → 0.2025.5.24__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jk_prettyprintobj/RawValue.py +9 -4
- jk_prettyprintobj/__init__.py +6 -1
- jk_prettyprintobj/dumper.py +14 -7
- {jk_prettyprintobj-0.2024.10.20.dist-info → jk_prettyprintobj-0.2025.5.24.dist-info}/METADATA +1 -1
- jk_prettyprintobj-0.2025.5.24.dist-info/RECORD +11 -0
- jk_prettyprintobj-0.2024.10.20.dist-info/RECORD +0 -11
- {jk_prettyprintobj-0.2024.10.20.dist-info → jk_prettyprintobj-0.2025.5.24.dist-info}/WHEEL +0 -0
jk_prettyprintobj/RawValue.py
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
|
2
2
|
|
3
|
+
import typing
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
|
3
8
|
|
4
9
|
#
|
5
10
|
# Represents a value that should be written directly without any automatic formatting.
|
@@ -17,11 +22,11 @@ class RawValue(object):
|
|
17
22
|
#
|
18
23
|
# Constructor method.
|
19
24
|
#
|
20
|
-
def __init__(self,
|
21
|
-
assert isinstance(
|
22
|
-
assert
|
25
|
+
def __init__(self, textOrLines:typing.Union[str,typing.List[str],typing.Tuple[str]]) -> None:
|
26
|
+
assert isinstance(textOrLines, (str,tuple,list))
|
27
|
+
assert textOrLines
|
23
28
|
|
24
|
-
self.
|
29
|
+
self.textOrLines = textOrLines
|
25
30
|
#
|
26
31
|
|
27
32
|
################################################################################################################################
|
jk_prettyprintobj/__init__.py
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
__author__ = "Jürgen Knauth"
|
5
|
-
__version__ = "0.
|
5
|
+
__version__ = "0.2025.5.24"
|
6
|
+
__email__ = "pubsrc@binary-overflow.de"
|
7
|
+
__license__ = "Apache2"
|
8
|
+
__copyright__ = "Copyright (c) 2020-2025, Jürgen Knauth"
|
9
|
+
|
10
|
+
|
6
11
|
__all__ = (
|
7
12
|
"DumperSettings",
|
8
13
|
"RawValue",
|
jk_prettyprintobj/dumper.py
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
import chunk
|
4
3
|
import typing
|
5
4
|
import collections
|
6
|
-
import math
|
7
|
-
import codecs
|
8
|
-
#import datetime
|
9
5
|
|
10
6
|
from .RawValue import RawValue
|
11
7
|
from .DumperSettings import DumperSettings
|
12
|
-
from ._Hex import _Hex
|
13
|
-
from ._Bits import _Bits
|
8
|
+
#from ._Hex import _Hex
|
9
|
+
#from ._Bits import _Bits
|
14
10
|
from ._ConverterFunctions import _ConverterFunctions as _CF
|
15
11
|
from ._ByteChunker import _ByteChunker
|
16
12
|
|
@@ -401,7 +397,18 @@ class DumpCtx(object):
|
|
401
397
|
#
|
402
398
|
|
403
399
|
def _dumpRawValue(self, extraPrefix:str, value:RawValue):
|
404
|
-
|
400
|
+
if isinstance(value.textOrLines, str):
|
401
|
+
self.outputLines.append(self.prefix + extraPrefix + value.textOrLines)
|
402
|
+
return
|
403
|
+
|
404
|
+
firstLine = value.textOrLines[0]
|
405
|
+
moreLines = value.textOrLines[1:]
|
406
|
+
|
407
|
+
self.outputLines.append(self.prefix + extraPrefix + firstLine)
|
408
|
+
|
409
|
+
_prefix2 = self.prefix + " " * len(extraPrefix)
|
410
|
+
for line in moreLines:
|
411
|
+
self.outputLines.append(_prefix2 + line)
|
405
412
|
#
|
406
413
|
|
407
414
|
def _dumpOmitted(self, extraPrefix:str, value, processorName:str = None):
|
{jk_prettyprintobj-0.2024.10.20.dist-info → jk_prettyprintobj-0.2025.5.24.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jk_prettyprintobj
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.2025.5.24
|
4
4
|
Summary: This python module provides a mixin for creating pretty debugging output for objects. This is especially useful for semi-complex data structures.
|
5
5
|
Keywords: pretty-print,debugging,debug
|
6
6
|
Author-email: Jürgen Knauth <pubsrc@binary-overflow.de>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
jk_prettyprintobj/DumperSettings.py,sha256=hPWXl-QwW8VCgF4Z8_vmTuzbRxJywGBxgY_X7Q9q5iE,2094
|
2
|
+
jk_prettyprintobj/RawValue.py,sha256=ndfRfx1HTK1CBr0CM-5h88FCEgUASfAQ3WChGFmqm3o,2059
|
3
|
+
jk_prettyprintobj/_Bits.py,sha256=EVAk9bMNpnuv_re8hi5vk4znK2xYHsceR07RG_0f4x0,805
|
4
|
+
jk_prettyprintobj/_ByteChunker.py,sha256=Q3BUM87TsuS5-_HorEDoaXIYwAxbyG1vsLgW9H64dUc,5031
|
5
|
+
jk_prettyprintobj/_ConverterFunctions.py,sha256=c31r8SZB4JXy8uohwXimBZR8Gn0rSfYs2jGhr9a5eJw,3301
|
6
|
+
jk_prettyprintobj/_Hex.py,sha256=RsqEIp8N4ms48aDCYIV1TLQxexd0TnxwRmnx91Y0MQg,515
|
7
|
+
jk_prettyprintobj/__init__.py,sha256=uo9Hwb5yzJ4FrdEEckbO1lGzaJkau6K_OmoUbA1JLT8,800
|
8
|
+
jk_prettyprintobj/dumper.py,sha256=CmbyLxorGSAv_gbjAztpDgnVWeaHm_ah-ldgGUNHACA,18990
|
9
|
+
jk_prettyprintobj-0.2025.5.24.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
10
|
+
jk_prettyprintobj-0.2025.5.24.dist-info/METADATA,sha256=v30kH7qziDvemMqwhK_Wg8jwI7_RxGB8578xy9u355E,8316
|
11
|
+
jk_prettyprintobj-0.2025.5.24.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
jk_prettyprintobj/DumperSettings.py,sha256=hPWXl-QwW8VCgF4Z8_vmTuzbRxJywGBxgY_X7Q9q5iE,2094
|
2
|
-
jk_prettyprintobj/RawValue.py,sha256=N-iBdP4MqBlO5RYSzLhQOFUb3J0qneKjnKL6beo6-MI,1944
|
3
|
-
jk_prettyprintobj/_Bits.py,sha256=EVAk9bMNpnuv_re8hi5vk4znK2xYHsceR07RG_0f4x0,805
|
4
|
-
jk_prettyprintobj/_ByteChunker.py,sha256=Q3BUM87TsuS5-_HorEDoaXIYwAxbyG1vsLgW9H64dUc,5031
|
5
|
-
jk_prettyprintobj/_ConverterFunctions.py,sha256=c31r8SZB4JXy8uohwXimBZR8Gn0rSfYs2jGhr9a5eJw,3301
|
6
|
-
jk_prettyprintobj/_Hex.py,sha256=RsqEIp8N4ms48aDCYIV1TLQxexd0TnxwRmnx91Y0MQg,515
|
7
|
-
jk_prettyprintobj/__init__.py,sha256=Lm-biGzrzeWnsRU0wcCfNDrU15Z0eJHFp_b6Nh4QoPw,677
|
8
|
-
jk_prettyprintobj/dumper.py,sha256=Z1wGB1qa-dPHbu_C799bLTf1e9EkFdumrGDUHCxpI3I,18727
|
9
|
-
jk_prettyprintobj-0.2024.10.20.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
10
|
-
jk_prettyprintobj-0.2024.10.20.dist-info/METADATA,sha256=iDuW49l_yZmpMJ2XsjGLf0bhRsh6xML-nV9tNsu5HG4,8317
|
11
|
-
jk_prettyprintobj-0.2024.10.20.dist-info/RECORD,,
|
File without changes
|