When creating a pipe with os.pipe()
it returns 2 file numbers; a read end and a write end which can be written to and read form with os.write()
/os.read()
; there is no os.readline(). Is it possible to use readline?
import os
readEnd, writeEnd = os.pipe()
# something somewhere writes to the pipe
firstLine = readEnd.readline() #doesn't work; os.pipe returns just fd numbers
In short, is it possible to use readline when all you have is the file handle number?