471,073 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

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:py*****************@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 ma********@utoronto.ca
History Department, University of Toronto
(416) 978-2094
--------------------------------------------

please don't use the following addresses: ze**@derailleur.org
aa******@derailleur.org
Jul 18 '05 #1
2 1533
Matt Price wrote:
I'd like to capture the stream in a string object. Is there a simle
way to do this?


Just read read from sys.stdin.

--
Maciej "Fiedzia" Dziardziel (fiedzia (at) fiedzia (dot) prv (dot) pl)
www.fiedzia.prv.pl

'Good manners will open doors that the best education cannot.' --
Clarence Thomas, U.S. Supreme Court Justice
Jul 18 '05 #2
On Thu, Oct 28, 2004 at 12:18:31AM +0200, Maciej Dziardziel wrote:
Matt Price wrote:
I'd like to capture the stream in a string object. Is there a simle
way to do this?


Just read read from sys.stdin.

thank you, sorry to be such a dope!
m
-------------------------------------------
Matt Price ma********@utoronto.ca
History Department, University of Toronto
(416) 978-2094
--------------------------------------------

please don't use the following addresses: ze**@derailleur.org
aa******@derailleur.org
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Christian Long | last post: by
2 posts views Thread by Csaba Henk | last post: by
2 posts views Thread by Steve | last post: by
7 posts views Thread by Edward Diener | last post: by
reply views Thread by Matt Price | last post: by
5 posts views Thread by runes | last post: by
2 posts views Thread by Apple Grew | last post: by
1 post views Thread by saibotorama | last post: by
2 posts views Thread by robert | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.