home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Python 1.3 / source code / Demo / sgi / al / x.py < prev   
Encoding:
Text File  |  1995-12-17  |  309 b   |  13 lines  |  [TEXT/R*ch]

  1. # Demonstrate that rsh exits when the remote end closes std{in,out,err}.
  2. # rsh voorn exec /ufs/guido/bin/sgi/python /ufs/guido/mm/demo/audio/x.py
  3.  
  4. print 'hoi!'
  5. import sys
  6. sys.stdin.close()
  7. sys.stdout.close()
  8. sys.stderr.close()
  9. import time
  10. time.sleep(5)
  11. sys.stdout = open('@', 'w')
  12. sys.stdout.write('Hello\n')
  13.