(name: str, text: bytes)
| 21 | |
| 22 | |
| 23 | def compile_and_marshal(name: str, text: bytes) -> bytes: |
| 24 | filename = f"<frozen {name}>" |
| 25 | # exec == Py_file_input |
| 26 | code = compile(text, filename, "exec", optimize=0, dont_inherit=True, module=name) |
| 27 | return marshal.dumps(code) |
| 28 | |
| 29 | |
| 30 | def get_varname(name: str, prefix: str) -> str: |