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

Function _write_string

tools/python-3.11.9-amd64/Lib/aifc.py:217–223  ·  view source on GitHub ↗
(f, s)

Source from the content-addressed store, hash-verified

215 f.write(struct.pack('>L', x))
216
217def _write_string(f, s):
218 if len(s) > 255:
219 raise ValueError("string exceeds maximum pstring length")
220 f.write(struct.pack('B', len(s)))
221 f.write(s)
222 if len(s) & 1 == 0:
223 f.write(b'\x00')
224
225def _write_float(f, x):
226 import math

Callers 2

_write_headerMethod · 0.85
_writemarkersMethod · 0.85

Calls 2

writeMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected