Home  >  Magazine  >  #73 May 2000  >  Python Programming for Beginners  >  Listing 13. Writing to Standard Input
Wednesday, March 29, 2000 | Last Updated 03:43:10 PM


  

Listing 13. Writing to Standard Input

#! /usr/local/bin/python
import os
n = 100
try:
    po = os.popen('sed \'s/-/+/g\' > output', 'w')
except IOError:
    exit(0)
while n != 0:
    n = n-1
    po.write('---\n')