mkfifo

fifo – reading in a loop

fifo – reading in a loop Question: I want to use os.mkfifo for simple communication between programs. I have a problem with reading from the fifo in a loop. Consider this toy example, where I have a reader and a writer working with the fifo. I want to be able to run the reader in …

Total answers: 3

Create a temporary FIFO (named pipe) in Python?

Create a temporary FIFO (named pipe) in Python? Question: How can you create a temporary FIFO (named pipe) in Python? This should work: import tempfile temp_file_name = mktemp() os.mkfifo(temp_file_name) open(temp_file_name, os.O_WRONLY) # … some process, somewhere, will read it … However, I’m hesitant because of the big warning in Python Docs 11.6 and potential removal …

Total answers: 6