MCPcopy Index your code
hub / github.com/pyload/pyload / write_bytecode

Method write_bytecode

module/lib/jinja2/bccache.py:72–81  ·  view source on GitHub ↗

Dump the bytecode into the file or file like object passed.

(self, f)

Source from the content-addressed store, hash-verified

70 self.code = marshal.loads(f.read())
71
72 def write_bytecode(self, f):
73 """Dump the bytecode into the file or file like object passed."""
74 if self.code is None:
75 raise TypeError('can\'t write empty bucket')
76 f.write(bc_magic)
77 pickle.dump(self.checksum, f, 2)
78 if isinstance(f, file):
79 marshal.dump(self.code, f)
80 else:
81 f.write(marshal.dumps(self.code))
82
83 def bytecode_from_string(self, string):
84 """Load bytecode from a string."""

Callers 2

bytecode_to_stringMethod · 0.95
dump_bytecodeMethod · 0.80

Calls 2

dumpMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected