capturing piped information

Oleg Broytmann phd at phd.russ.ru
Mon Mar 13 19:14:07 CET 2000


On Mon, 13 Mar 2000, Thomas wrote:
> |/var/scripts/unsubscribe.py
> 
> how do I access this piped information inside the script?

import sys
while 1:
   line = sys.stdin.readline()
   if not line: break
   Process(line)

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list