Home  >  Magazine  >  #73 May 2000  >  Python Programming for Beginners  >  Listing 14. Reading from Pipe
Wednesday, March 29, 2000 | Last Updated 03:43:15 PM


  

Listing 14. Reading from Pipe

#! /usr/local/bin/python
import os
try:
    po = os.popen('cat /usr/doc/FAQ/txt/Linux-FAQ | pr -2', 'r')
except IOError:
    exit(0)
print po.read()