erg/examples/with.er
2023-05-09 23:55:23 +09:00

13 lines
322 B
Python

with! open!("examples/record.er"), f =>
print! f.read!()
with! open!("examples/set.er"), f =>
for! f.readlines!(), line =>
print!("line: " + line)
open_file!(path) =
with! open!(path, mode:="r" , encoding:="utf_8"), f =>
data = f.read!()
data
print! open_file!("examples/record.er")