title: Python read named PIPE
body: <p>I have a named pipe in linux and i want to read it from python. The problem is that the python process 'consumes' one core (100%) continuously. My code is the following:</p>
  
  <pre><code>FIFO = '/var/run/mypipe'
  os.mkfifo(FIFO)
  with open(FIFO) as fifo:
      while True:
          line = fifo.read()
  </code></pre>
  
  <p>I want to ask if the 'sleep' will help the situation or the process going to loss some input data from pipe. I can't control the input so i don't know the frequency of data input. I read about select and poll but i didn't find any example for my problem. Finally, i want to ask if the 100% usage will have any impact on the data input(loss or something?).</p>
  
  <p>edit: I don't want to break the loop. I want the process runs continuously and 'hears' for data from the pipe.</p>