Zulip Chat Archive
Stream: general
Topic: Read file line by line in Lean?
Fred May (Oct 29 2024 at 14:58):
I found documentation on file streams in lean, but I can't find the actual method to construct any of these types or create a file stream?
Henrik Böving (Oct 29 2024 at 15:06):
The methods that create streams are right below. As the doc string says these are currently only used for stdin out and err, files use the other types in that module
Henrik Böving (Oct 29 2024 at 15:07):
And as your actual question seems to be related to reading line by line: there is a getLine function in there
Fred May (Oct 29 2024 at 15:13):
<deleted>
Mac Malone (Oct 29 2024 at 17:32):
In addition to stdout/stderr, there is also docs#IO.FS.Stream.ofHandle to create a stream from a file.
Last updated: May 02 2025 at 03:31 UTC