reads a line of text from a stream and returns it as a string.
reads a line of text generated by an external process and returns it as a string.
- ReadLine reads until it encounters a newline, either or .
- In ReadLine[src], src can have head InputStream or ProcessObject.
- ReadLine is a blocking function that by default will not return until it has read a complete line of text.
- With the option setting TimeConstraint->t, ReadLine waits at most t seconds, then returns whatever it has read by that time.
- If ReadLine is called on a source of content that has already been exhausted, it returns EndOfFile.
- ReadLine[src] is equivalent to ReadString[src,"\n"|"\n\n"].
Introduced in 2014