MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / hexline

Method hexline

pydevd_attach_to_process/winappdbg/textio.py:614–637  ·  view source on GitHub ↗

Dump a line of hexadecimal numbers from binary data. @type data: str @param data: Binary data. @type separator: str @param separator: Separator between the hexadecimal representation of each character. @type width: int @param

(cls, data, separator=" ", width=None)

Source from the content-addressed store, hash-verified

612
613 @classmethod
614 def hexline(cls, data, separator=" ", width=None):
615 """
616 Dump a line of hexadecimal numbers from binary data.
617
618 @type data: str
619 @param data: Binary data.
620
621 @type separator: str
622 @param separator:
623 Separator between the hexadecimal representation of each character.
624
625 @type width: int
626 @param width:
627 (Optional) Maximum number of characters to convert per text line.
628 This value is also used for padding.
629
630 @rtype: str
631 @return: Multiline output text.
632 """
633 if width is None:
634 fmt = "%s %s"
635 else:
636 fmt = "%%-%ds %%-%ds" % ((len(separator) + 2) * width - 1, width)
637 return fmt % (cls.hexadecimal(data, separator), cls.printable(data))
638
639 @classmethod
640 def hexblock(cls, data, address=None, bits=None, separator=" ", width=8):

Callers 4

find_in_memoryMethod · 0.80
dump_registers_peekMethod · 0.80
dump_data_peekMethod · 0.80
dump_stack_peekMethod · 0.80

Calls 2

printableMethod · 0.80
hexadecimalMethod · 0.45

Tested by

no test coverage detected