()
| 58 | |
| 59 | def py_write_file_source(index: int) -> str: |
| 60 | def write_file(): |
| 61 | with open("/pyodide{index}/file_from_{index}.txt", "w", encoding="utf-8") as f: |
| 62 | f.write("pyodide{index}") |
| 63 | |
| 64 | return ( |
| 65 | getsource(write_file).format(index=index).lstrip() + f"{write_file.__name__}()" |