capturing piped information

Michael Hudson mwh21 at cam.ac.uk
Mon Mar 13 12:58:43 EST 2000


Thomas <thomas at madeforchina.com> writes:

> Hi everyone,
> 
> I want to write a simple script which is run each time someone
> mails my list subscribe address: subsribe at mfc.com.  In my qmail 
> 'subscribe' alias I added a pipe which pipes all the mail to my script.  
> ie.:
> 
> |/var/scripts/unsubscribe.py
> 
> My problem :
> how do I access this piped information inside the script?
> 
> Any suggestions or help appreciated.

It comes down stdin, so via sys.stdin or raw_input probably.

Cheers,
M.

-- 
very few people approach me in real life and insist on proving they are
drooling idiots.                         -- Erik Naggum, comp.lang.lisp



More information about the Python-list mailing list