MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / load

Function load

tools/python-3.11.9-amd64/Lib/plistlib.py:865–884  ·  view source on GitHub ↗

Read a .plist file. 'fp' should be a readable and binary file object. Return the unpacked root object (which usually is a dictionary).

(fp, *, fmt=None, dict_type=dict)

Source from the content-addressed store, hash-verified

863
864
865def load(fp, *, fmt=None, dict_type=dict):
866 """Read a .plist file. 'fp' should be a readable and binary file object.
867 Return the unpacked root object (which usually is a dictionary).
868 """
869 if fmt is None:
870 header = fp.read(32)
871 fp.seek(0)
872 for info in _FORMATS.values():
873 if info['detect'](header):
874 P = info['parser']
875 break
876
877 else:
878 raise InvalidFileException()
879
880 else:
881 P = _FORMATS[fmt]['parser']
882
883 p = P(dict_type=dict_type)
884 return p.parse(fp)
885
886
887def loads(value, *, fmt=None, dict_type=dict):

Callers 2

loadsFunction · 0.70
pickle.pyFile · 0.70

Calls 5

readMethod · 0.45
seekMethod · 0.45
valuesMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected