piping a stream to a python script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matt Price

    #1

    piping a stream to a python script

    Hi folks,

    I'm writing a python script which I plan to use in a macro for mutt,
    the mailer. The script is supposed to generate and send an email
    based on a mailto: url pulled out of an email header. The header will
    be passed to the script in the following form, using a pipe:

    <http://mail.python.org/mailman/listinfo/python-list>,
    <mailto:pytho n-list-request@python. org?subject=uns ubscribe>

    (the mutt macro looks like this:
    | formail -x List-Unsubscribe: | /usr/local/scripts/mailout.py )

    I'd like to capture the stream in a string object. Is there a simle
    way to do this?

    Thanks much,

    Matt


    -------------------------------------------
    Matt Price matt.price@utor onto.ca
    History Department, University of Toronto
    (416) 978-2094
    --------------------------------------------

    please don't use the following addresses: zeus@derailleur .org
    aardvark@derail leur.org
Working...