MCPcopy Index your code
hub / github.com/python-openxml/python-docx / read_short

Method read_short

src/docx/image/helpers.py:46–50  ·  view source on GitHub ↗

Return the int value of the two bytes at the file position determined by `base` and `offset`, similarly to ``read_long()`` above.

(self, base, offset=0)

Source from the content-addressed store, hash-verified

44 return self._read_int(fmt, base, offset)
45
46 def read_short(self, base, offset=0):
47 """Return the int value of the two bytes at the file position determined by
48 `base` and `offset`, similarly to ``read_long()`` above."""
49 fmt = b"<H" if self._byte_order is LITTLE_ENDIAN else b">H"
50 return self._read_int(fmt, base, offset)
51
52 def read_str(self, char_count, base, offset=0):
53 """Return a string containing the `char_count` bytes at the file position

Callers 8

from_streamMethod · 0.80
from_streamMethod · 0.80
from_streamMethod · 0.80
from_streamMethod · 0.80
_entry_countMethod · 0.80
_IfdEntryFactoryFunction · 0.80
from_streamMethod · 0.80
_parse_valueMethod · 0.80

Calls 1

_read_intMethod · 0.95

Tested by

no test coverage detected